Namespace, Primitive, Method

    grunt-metascript

    0.0.6 • Public • Published

    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.

    Install

    npm i grunt-metascript

    DownloadsWeekly Downloads

    6

    Version

    0.0.6

    License

    MIT

    Last publish

    Collaborators

    • meinaart