grunt-riotts-precompile
v0.0.2
Published
precompile tags for RiotTS
Downloads
4
Readme
grunt-riotts-precompile
Precompile tags for RiotTS
This task is meant to be used with RiotTS, the TypeScript friendly version of Riot.js.
It reads HTML template files from a directory, compiles them with Riot and makes them available to RiotTS into a single concatenated JavaScript file.
See RiotTS documentation for more details on how to use precompiled tags.
How to use it
Install with
npm install grunt-riotts-precompile --save-dev
Then customize your Gruntfile.js
with something like this:
grunt.initConfig({
precompileTags: {
src: ['tags/**/*.html'],
dest: 'precompiled-tags.js',
indexByTagName: false
}
});
grunt.loadNpmTasks('grunt-riotts-precompile');
grunt.registerTask('default', ['precompileTags']);
grunt.registerTask('clean', ['precompileTags:off']);
With the above example task, all tags from the tags/
directory are read and compiled into precompiled-tags.js
.
src
is the source folderdest
is the output JavaScript file to be linked in your applicationindexByTagName
if set totrue
will index compiled tags by tagname rather than file path.