grunt-metascript
Grunt wrapper for MetaScript preprocessor.
Last updated 4 years ago by meinaart .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install grunt-metascript 
SYNC missed versions from official npm registry.

grunt-metascript Build Status

Grunt wrapper for MetaScript

Getting Started

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.

Documentation

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');

Contributing

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.

License

Copyright (c) 2014 Meinaart van Straalen Licensed under the MIT license.

Current Tags

  • 0.0.6                                ...           latest (4 years ago)

5 Versions

  • 0.0.6                                ...           4 years ago
  • 0.0.5                                ...           6 years ago
  • 0.0.4                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |