gulp-recipe-loader
Automatic gulp recipe loading and task registration
example gulpfile
// depsvar gulp =requireDir = ;// read config files from ./gulp-config directoryvar config = ;// load all recipesvar $ = gulp config;// mark build task as default$gulp;
Sources configuration syntax
First of all, define your defualt base path. It has to be a real path. Default value is '.'
, but most probably wou will need to change it.
All paths are relative to gulpfile location.
sourcesdefaultBase = 'app/';
There are few ways to define source. The most basic one is just a string with glob path.
sourcescss = 'app/styles/*.css';
You can also provide an array of globs or other sources.
sourcesbowerScripts ='app/bower_components/*/*.js''app/bower_components/*/{dist,min,release}/*.js';
If you need to change the base for specific set of paths, you can use object notation.
sourcesspecialFiles =files: 'special/**/*' // the 'files' can be any valid source. A glob or array of globs will work.base: 'special/';
Sources can be easily composited. You can use any valid source inside the other.
sourcesdevAssets =sourcesjssourcescss'app/icons/**/icon-*.svg'sourcestempFiles
Important note: If you nest other sources inside source object, the properties of the outer object will be applied.
sourcesmyFiles =files: 'defs/scene-*.xml'base: 'defs/';// this is BADsourcesmoreFiles =files: sourcesassets 'more/*.files'base: 'more/'
The actual content of sources.moreFiles
will be identical to this:
// actual output of that BAD thingsourcesmoreFiles =files: 'defs/scene-*.xml' 'more/*.files'base: 'hello/' // note mismatched base for first file definition
What you probably wanted to do instead is
// this is GOODsourcesmoreFiles =sourcesmyFiles // the base is preservedfiles: 'more/*.files'base: 'more/'