
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
grunt-submodule
Advanced tools
Run Grunt across Git submodules.
grunt-submodule provides a Grunt task to run Grunt in a project's
submodules. You can use the submodule's Gruntfile and node_modules or keep
both outside the submodule.
$ grunt submodule:deps/*:build
└─1─────┘ └─2──┘ └─3─┘
1) this task
2) submodule pattern
3) grunt task to run there
This plugin requires Grunt (d'uh). You probably have used Grunt before, but just in case you're wondering what this is all about, have a look at the Getting Started guide.
To use this plugin, you first need to install it and add it to your Gruntfile:
$ npm install grunt-submodule --save-dev
grunt.loadNpmTasks('grunt-submodule');
The submodule task tries to mimic the behavior of multi-tasks – tasks
that can have multiple configurations, defined using arbitrarily named
"targets." Each submodule behaves like a target but it can be used without any
explicit configuration.
In your project's Gruntfile, add a section named submodule to the data
object passed into grunt.initConfig().
grunt.initConfig({
submodule: {
options: {
// Task-specific options go here.
},
'**/*_test': {
// Submodule-specific file lists and/or options go here.
options: {
}
}
}
})
Type: String
Default value: Gruntfile.js
The Gruntfile to use. This is relative to the submodule path, so if you want to share the same Gruntfile with multiple submodules, just use an absolute path.
Type: String
Default value: '.'
The base directory to load Grunt tasks from if they do not exist in the
submodule. If the submodule has its own node_modules or tasks directories
these will take precedence over the ones inside the base directory.
Type: Array
Default value: [ 'default' ]
The tasks to run if no tasks were given on the command line.
In this example, the task will just enter each submodule, run Grunt with the
default task and exit.
grunt.initConfig({
submodule: {
options: {}
}
});
Here we use a shared Gruntfile for all submodules and run the build and test
tasks in each of them.
grunt.initConfig({
submodule: {
options: {
gruntfile: __dirname + '/Gruntfile.shared.js',
tasks: [ 'build', 'test' ]
}
}
});
It is possible to override the global options for each submodule. You can either specify options fora specific submodule or use a pattern to configure multiple submodules at once.
grunt.initConfig({
submodule: {
options: {
tasks: [ 'build' ]
},
'deps/*': {
options: {
tasks: [ 'build', 'test' ]
}
},
'deps/grunt-submodule': {
options: {
tasks: [ 'test', 'jshint' ]
}
}
}
});
Just fork the repository, send me a pull request and we'll work out the rest together, Ok?
(Nothing yet)
Copyright © 2014 Jonas Pommerening
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Run Grunt across Git submodules without
The npm package grunt-submodule receives a total of 19 weekly downloads. As such, grunt-submodule popularity was classified as not popular.
We found that grunt-submodule demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.