The best Grunt plugin ever.
This plugin requires Grunt ~0.4.4
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install tplcompile --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('tplcompile');
In your project's Gruntfile, add a section named tplcompile
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
tplcompile: {
default_options: {
files: {
src: ['test/fixtures/tpl/*.html']
},
options: {
root : 'test/',
wrap : 'seajs',
output : 'default'
}
}
},
});
Type: String
Default value: 'seajs'
wrap the js file to a seajs module or nodejs module
Type: String
Default value: 'tmpl'
compiled file path
Type: String
Default value: ''
seajs module define name
Type: Array
Default value: []
global object list.
grunt.initConfig({
default_options: {
files: {
src: ['test/fixtures/tpl/*.html']
},
options: {
root : 'test/',
wrap : 'seajs',
output : 'default'
}
}
});
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
(Nothing yet)