0.0.1 • Published 10 years ago

grunter-projects v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

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