gulp-jspm-nimedev
v1.0.4
Published
Gulp functions to bundle files with jspm
Downloads
2
Maintainers
Readme
gulp-jspm-nimedev
Gulp functions to bundle files with jspm
Installation
$ npm install gulp-jspm-nimedev
Usage
To bundle only javascript files retated with the app write in gulpfile.js
:
// Require the module
const jspmTask = require('gulp-jspm-nimedev')
// Get jspm dependencies from package.json
const appSetting = require('./package')
const jspmConfig = appSetting.jspm
// Set options object for jspmTask function
const options = {
src: 'app/main.js',
dest: 'dist/assets/js',
baseName: 'app',
ignoreVendors: true
}
// Create a gulp task to bundle js files with sourcemaps
gulp.task('jspm-app:dev', jspmTask(options, jspmConfig, true))
To bundle only depenencies of the app write in gulpfile.js
:
// Require the module
const jspmTask = require('gulp-jspm-nimedev')
// Get jspm dependencies from package.json
const appSetting = require('./package')
const jspmConfig = appSetting.jspm
// Set options object for jspmTask function
const options = {
src: 'app/main.js',
dest: '.tmp',
baseName: 'dep',
onlyVendors: true
}
// Create a gulp task to bundle js dependencies
gulp.task('jspm-dep', jspmTask(options, jspmConfig))
Note: src and dest in options objects follow the same rules of gulp.src() and gulp.dest() arguments