Grunt wrapper for MetaScript
This plugin requires Grunt ~0.4.0
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 grunt-metascript --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-metascript');
This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that you upgrade.
grunt.initConfig({
metascript: {
program: {
options: {
mode: 'program', /* can be either "program" or "transform" */
scope: { /* object with variables required in MetaScript scope */
WHAT: true
},
// Sets the loglevel, there are 4 levels:
// LOG_NONE = 0
// LOG_ERROR = 1
// LOG_INFO = 2
// LOG_TRACE = 3
// Default is: 2
logLevel: 2
},
src: 'test/in/somemeta.js',
dest: 'out/somemeta-program.js',
}
},
});
grunt.loadNpmTasks('grunt-metascript');
Configuration follow the multi-task standard configuration format: http://gruntjs.com/configuring-tasks
grunt.initConfig({
metascript: {
options: {
mode: 'program',
scope: { WHAT: true }
},
expand: true,
cwd: 'src/',
src: '**/*.js',
dest: 'dist/'
}
});
grunt.loadNpmTasks('grunt-metascript');
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.
Copyright (c) 2014 Meinaart van Straalen Licensed under the MIT license.