A simple plugin for Grulper. This module load your projects specification from JSON config file.
The easiest way is to keep grulper-load-projects
as a devDependency in your package.json
.
{
"devDependencies": {
"gulp": "^3.9.0",
"grulper-load-projects": "0.0.1"
}
}
You can simple do it by:
npm install grulper-load-projects --save-dev
Create a json file like this:
{
"default":{
"rootDirectory": "./src",
"outputDirectory": "/dist",
"configuration": {
"base":"/config",
"files":[
"build.json"
]
},
"tasks":{
"base":"/config/tasks",
"default": ["scripts"]
}
}
}
And then you can use it from 'require' by specifying json config file
var myProjectHelper = require('grulper-load-projects')('gulp/config.json');
console.log(myProjectHelper.projectSetting.projectDirectory + myProjectHelper.projectSetting.projectTasks);
var lib = testProjectLoaded.getLibrary('build');
console.log(lib.sampleNode.prop);
In line of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using gulp.
(Nothing yet)
Licensed under the MIT license.