0.3.0 • Published 9 years ago

tag-loader v0.3.0

Weekly downloads
77
License
MIT
Repository
github
Last release
9 years ago

Riot tag file loader for Webpack

Webpack can use this loader to automatically compile Riot tag files. Inspired by this GitHub Gist.

Install

npm install tag-loader --save-dev

webpack.config.js Configuration

  :
module: {
loaders: [
  { test: /\.tag$/, loader: 'tag' },
    :
]
}
  :

Use query parameters to include Riot compiler command options. Examples:

{ test: /\.tag$/, loader: 'tag?compact' },
{ test: /\.tag$/, loader: 'tag', query: {compact: 'true'} },

See also the Webpack loader documentation.

ES5 projects

Once you've installed and configured the tag-loader you can require Riot tag files into your project using the require() function e.g.

require('./tags.tag');

ES6 projects

Once you've installed and configured the tag-loader and 6to5-loader you can import Riot tag files into your project using the ES6 module import statement e.g.

import './tags.tag'

NOTE: I do not recommend using ES6 code inside Riot tag files, here's why.

0.3.0

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago