grunt-optimize-js
v0.6.0
Published
Optimize JavaScript with optimize-js
Downloads
72
Readme
grunt-optimize-js
Grunt plugin for optimize-js
Optimize JavaScript for faster initial load by wrapping all immediately-invoked functions.
Install
npm install grunt-optimize-js --save-dev
or
yarn add grunt-optimize-js --dev
Usage
module.exports = function( grunt ) {
grunt.initConfig( {
'optimize-js': {
options: {
sourceMap: false,
silent: false
},
dist: {
files: {
'dist/app.optimized.js': 'src/app.js'
}
}
}
} );
grunt.loadNpmTasks( 'grunt-optimize-js' );
grunt.registerTask( 'default', [ 'optimize-js' ] );
};
Options
sourceMap: true
Include source map defaults to false
silent: true
Skip the status output defaults to false