grulper-load-projects

1.0.2 • Public • Published

grulper-load-projects

GitHub version Dependency Status devDependency Status peerDependency Status Build Status Coverage Status

Grulper Load Projects

A simple plugin for Grulper. This module load your projects specification from JSON config file.

Installation

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

Usage

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);

Contributing

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.

Release History

(Nothing yet)

License

Licensed under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i grulper-load-projects

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • patiernom