grunt-cli-babel

v0.0.5
Grunt CLI wrapper around Babel
grunt grunt-cli es6 harmony babel

grunt-cli-babel

npm version badge License

Grunt CLI wrapper around the Babel!

Getting Started

If you haven't used Grunt before, be sure to check out the Getting Started guide.

Usage

Example with global installation

Installation

npm install -g grunt-cli-babel

Gruntfile.js

import path from 'path';

export default grunt => {
    let clean = {
        test: [
            path.resolve('cache')
        ]
    };

    // Register "clean" task
    grunt.initConfig({ 
        clean 
    });

    grunt.loadNpmTasks('grunt-contrib-clean');
    grunt.registerTask('default', ['clean']);
};

Yeah, you can write the Gruntfile using ECMAScript 6th edition!

package.json

{
    "dependencies": {
        "grunt-contrib-clean": "^0.6.0"
    }
}

Using

grunt clean

if you have some problems with global installation try the following:

npm config set prefix '~/.npm-packages'

and adding $HOME/.npm-packages/bin to $PATH

append to .bashrc

export PATH="$PATH:$HOME/.npm-packages/bin"

Example with local installation

There's an alternative and more preferred way based on package.json.

Gruntfile.js

import path from 'path';

export default grunt => {
    let clean = {
        test: [
            path.resolve('cache')
        ]
    };

    // Register "clean" task
    grunt.initConfig({ 
        clean 
    });

    grunt.loadNpmTasks('grunt-contrib-clean');
    grunt.registerTask('default', ['clean']);
};

package.json

{
    "scripts": {
        "clean": "grunt clean"
    },

    "dependencies": {
        "grunt-contrib-clean": "^0.6.0",
        "grunt-cli-babel"    : "^0.0.4"
    }
}

Installation

npm install

Using

grunt clean

See more details about npm run.

License

MIT

Task submitted by Alexander Abashkin

npm i grunt-cli-babel

Metadata

  • MIT
  • >=0.8.0
  • Abashkin Alexander
  • released 9/1/2015

Downloads

Maintainers