Gulp wizard is a general automated build tool for building client side javascript applications with NodeJS and Bower. With this you don't have to write the same build file over and over again, just configure some options and start the build. Now it specialized only for Angularjs applications.
npm install --save-dev gulp-wizard
Create a very simple gulpfile:
require('gulp-wizard')();
Put some less, javascript and html files into the src
folder (check out the example)
Run the gulp build, some examples:
gulp
gulp --develop
gulp --debug
gulp watch
gulp javascript less bower-css bower-js templatecache
It will generate the output files into the destination directory, which is public
by default.
You can pass configuration to the wizard:
require('gulp-wizard')({
foo: 'bar' // configuration options
pluginid: {
pluginOption: ... // module options
}
});
Basic configurations
baseSourceDir
: all sources located here, default: src
vendorBaseSourceDir
: bower directory, default: bower_components
,destDir
: all output goes there, default public
develop
: are we in the develop mode?, default false
. Use the command line parameter to activate.debug
: debug the build process, default false
. It shows what files are processing. Use the command line parameter to activate.sourceMaps
: generation source maps (it's on in case develop mode), default: false
notifyError
: alert the user of any failure, default: true
notifySuccess
: notify the user in case the build was success, default: false
silent
: do not make noise in case error, default: false
Basic module options
src
: Source files inside the base source directorydest
: Destination folder inside the destDirout
: Output file nameYou can set options for every plugin listed above in the feature section. Setting the module plugins to false means turning them off.
bower-css
: bower
, cleancss
bower-js
: bower
, uglify
less
: less
, autoprefixer
, cleancss
javascript
: eslint
, eslintDev
(this will merge to the eslint
in case develop mode), babel
, ngAnnotate
, uglify
templatecache
: htmlmin
, templateCache
Non null default values for the module plugin options:
autoprefixer
:
browsers
: ['last 2 versions']
remove
: true
eslint
:
parser
: 'babel-eslint'
parserOptions
: { ecmaVersion: 7, sourceType: 'script' }
rules
: { strict: 0, quotes: 0, yoda: 0 }
globals
: { '_': true, '$': true, angular: true, angularI18n: true, grecaptcha: true, jQuery: true, moment: true, 'moment-range': true, s: true }
envs
: [ 'browser' ]
eslintDev
:
rules
: { 'no-unused-vars': 1, 'no-console': 1, 'no-alert': 1 }
ngAnnotate
: {}
babel
{ compact: false, presets: ['es2015'], plugins: ['babel-plugin-transform-decorators-legacy'] }
htmlmin
:
collapseWhitespace
: true
removeComments
: true
templateCache
:
standalone
: true
Complex example for:
require('gulp-wizard')({
silent: true
less: {
out: 'another.css'
autoprefixer: {
browsers: ['> 1%']
}
},
javascript: {
uglify: false
},
'bower-css': false
});
0.4.1
0.4.0
0.3.1
0.2.5
0.2.4
0.2.3
0.1.0
MIT