Skip to content

patiernom/grulper-load-projects

Repository files navigation

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.

About

A simple Grulper module for load your projects specification from JSON.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published