npm install grunt-esnext



Grunt task for compiling JS.next to JS.today, using esnext
This plugin requires Grunt.
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:
``sh`
npm install grunt-esnext --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
`javascript`
grunt.loadNpmTasks('grunt-esnext');
taskRun this task with the grunt esnext command.
#### sourceMap
Type: Boolean or String ("inline") true
Default: if sourceMapName option is specified, otherwise false
Generate a source map (including [regenerator][regenerator] runtime if includeRuntime option is enabled).
true writes a source map file in addition to the compiled file.
"inline" appends a base64-encoded source map to the compiled file.
#### sourceMapName
Type: String .map
Default: Compiled file name +
Rename source map files. Both relative path and absolute path are available.
#### arrayComprehensions
Type: Boolean false
Default:
> Compile ES6 array comprehensions.
#### arrowFunction
Type: Boolean true
Default:
> Compile ES6 arrow functions into normal functions.
#### class
Type: Boolean true
Default:
> Compile ES6 classes into ES5 constructors.
#### computedPropertyKeys
Type: Boolean true
Default:
> Compile [ES6 computed property keys][object].
#### defaultParams
Type: Boolean true
Default:
> Compile [ES6 default parameters][params] to ES5.
#### destructuring
Type: Boolean true
Default:
> Compile ES6 destructuring assignment.
#### generator
Type: Boolean true
Default:
> Compile generator functions into ES5.
#### includeRuntime
Type: Boolean false
Default:
Include regenerator runtime library if generator option is enabled. Even though source is more than one file, runtime is appended to the concatenated file only once.
#### objectConcise
Type: Boolean true
Default:
> Compile [object literal concise method definitions][object].
#### rest
Type: Boolean true
Default:
> Compile [rest params][params] into ES5.
#### spread
Type: Boolean true
Default:
> Compile [spread operator][params].
#### templates
Type: Boolean true
Default:
> Compile template strings into ES5.
#### regexpu
Type: Boolean true
Default:
> Compile unicode regexes into ES5.
`javascript
grunt.initConfig({
esnext: {
options: {
includeRuntime: true
},
dist: {
src: ['src/main/*.js'],
dest: 'dist/main.js'
}
}
});
grunt.loadNpmTasks('grunt-esnext');
grunt.registerTask('default', ['esnext']);
``
Copyright (c) Shinnosuke Watanabe
Licensed under the MIT license
[object]: https://github.com/lukehoban/es6features#enhanced-object-literals
[params]: https://github.com/lukehoban/es6features#default--rest--spread
[regenerator]: https://github.com/facebook/regenerator