grunter-projects
v0.0.1
Published
Module for load project from json configuration file
Downloads
4
Readme
GruntProjects
Module for load project from json configuration file
Installation
The easiest way is to keep grunter-projects
as a devDependency in your package.json
.
{
"devDependencies": {
"grunt": "~0.10",
"grunter-projects": "0.0.1"
},
"projectsConfig": "./config/projects.json"
}
You can simple do it by:
npm install grunter-projects --save-dev
Configuration
// Gruntfile.js
var packageJSON = grunt.file.readJSON('package.json');
grunt.initConfig({
pkg: packageJSON,
projects: require('grunterprojects')(packageJSON), // Project configuration.
});
Usage
You can use it into grunt task
// customGruntTask.js
var myDir = grunt.config('projects').projectDirectory
Or you can invoke grunt and run task of specific project
grunt --project MyCustomProject
grunt myCustomTask --project MyCustomProject
License
MIT