Socket
Socket
Sign inDemoInstall

grunt-hub

Package Overview
Dependencies
1
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    grunt-hub

A Grunt task to watch and run tasks on multiple Grunt projects


Version published
Maintainers
1
Created

Readme

Source

grunt-hub

A Grunt task to watch and run tasks on multiple Grunt projects

Getting Started

Install this grunt plugin next to your project's Gruntfile with: npm install grunt-hub

Then add this line to your project's Gruntfile:

grunt.loadNpmTasks('grunt-hub');

Documentation

This plugin includes a hub task and overrides the watch task.

hub task

The hub task is for running tasks on multiple projects. It would like to know which Gruntfiles to use and which tasks to run on each Grunt project. For example if I would like to lint and test on every Grunt project one folder up:

grunt.initConfig({
  hub: {
    'lint test': ['../*/grunt.js'],
  }
});

or using the more explicit syntax and only specifying certain Grunt projects:

grunt.initConfig({
  hub: {
    all: {
      files: [
      	'../grunt-jam/grunt.js',
      	'../grunt-docs/grunt.js'
      ],
      tasks: ['lint', 'test']
    }
  }
});

watch task

The watch task is for watching multiple Grunt projects and triggering tasks on the respective Grunt project as files are edited. This watch task will read each project's Gruntfile and use each watch config to determine which files to watch and which tasks to run.

To specify which Gruntfiles this watch task should read use:

grunt.initConfig({
  watch: '../*/grunt.js',
});

or if you're using the above hub config, simply:

grunt.initConfig({
  watch: '<config:hub.all.files>',
});

Contributing

Please open an issue or send a pull request. Thanks!

Release History

  • 0.1.0 initial release

License

Copyright (c) 2012 Kyle Robinson Young
Licensed under the MIT license.

Keywords

FAQs

Last updated on 01 Aug 2012

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc