npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

This package has been deprecated

Author message:

No longer maintained.

grunt-horde

0.4.0 • Public • Published

grunt-horde

Packageable, composable grunt configuration modules

  • Use Gruntfile.js to define the composition at a high-level.
  • Reuse common configuration by storing them as modules.
  • Customize the merged configuration with a composition API.
  • More easily maintain sections like initConfig, loadNpmTasks, and registerTask in individual files.
  • Access convenient aliases for template expansion, object merging, and semver.
  • Load configurations from regular directories or local NPM modules.

Build Status

Example

Gruntfile.js

Define the composition at a high-level: the modules to merge, in what order, and final customization.

module.exports = function(grunt) {
  var horde = require('grunt-horde').create(grunt);
  horde
    .loot('my-base-config')
    .loot('./config/grunt')
    .demand('initConfig.eslint.options', {envs: ['node', 'es6']})
    .attack();
};

./node_modules/my-base-config/

Loaded first, this module provides a baseline.

initConfig/
    index.js
    eslint.js
    shell.js
tasks/
    precommit.js
loadNpmTasks.js
loadTasks.js
registerTask.js
registerMultiTask.js
// initConfig/eslint.js
module.exports = function() {
  return {
    src: {
      files: {
        src: ['index.js', 'lib/**/*.js']
      }
    }
  };
};

./config/grunt/

Defines project-specific configs that are merged recursively with ./node_modules/my-base-config.

initConfig/
    eslint.js
loadNpmTasks.js
registerTask.js
// initConfig/eslint.js
module.exports = function() {
  return {
    src: {
      files: {
        test: ['test/**/*.js']
      }
    }
  };
};

Now initConfig.eslint contains both src (from ./node_modules/my-base-config) and test (from ./config/grunt).

Installation

NPM

npm install grunt-horde

Documentation

Usage

Development

License

MIT

Tests

npm test

install

npm i grunt-horde

Downloadsweekly downloads

101

version

0.4.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability