coffee-in-vue-templates-loader
Webpack-loader to use coffeescript in vue templates as attributes or interpolations.
Last updated a year ago by bwin .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install coffee-in-vue-templates-loader 
SYNC missed versions from official npm registry.

coffee-in-vue-templates-loader [CIVTL]

| Webpack-loader to use coffeescript in vue templates as attributes or interpolations.

Install with:

yarn add --dev coffee-in-vue-templates-loader

Example usage:

<template lang="pug">
	div(:class="active: i is 2" @click="fn item, something: yes") {{ $t 'buttons.ok' }}
</template>

This would get transpiled to:

<template>
	<div :class="{ active: i === 2 }" @click="fn(item, { something: true })">{{ $t('buttons.ok') }}</div>
</template>

For example to use with pug, put the following in nuxt.config.coffee:

[...]
	build:
		extend: (config, ctx) ->
			config.module.rules.push
				test: /\.pug$/
				use: ['coffee-in-vue-templates-loader', 'pug-plain-loader']

Current Tags

  • 0.0.3                                ...           latest (a year ago)

3 Versions

  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |