Grunt task for cjs2web.
Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-cjs2web
Add the following line to your project's grunt.js
gruntfile:
grunt.loadNpmTasks('grunt-cjs2web');
Configuration for this grunt task is equal to cjs2web's options. Example:
grunt.initConfig({
cjs2web: {
all: {
fileName: './src/index.js',
combine: true,
iife: true
}
}
});
Execute the task:
grunt cjs2web:all