Reputation: 231
I have a node app that includes multiple unpublished modules. My app's package.json
includes a few git dependencies:
"module-a": "git+ssh://[email protected]:me/module-a.git",
"module-b": "git+ssh://[email protected]:me/module-b.git"
and each of those have their own grunt config. Eg in node_modules/module-a/grunt.js
:
module.exports = function(grunt) {
grunt.initConfig({
lint: {
files: ['server/**/*.js', 'test/**/*.js']
},
jshint: {
options: require('./lint-ci')
}
});
grunt.registerTask('default', 'lint');
};
(they also run tests, etc, but I'm keeping it simple here)
Is there a built-in way to do this with grunt? Note that I want to keep the dependent grunt.js files for convenience when I've only changed something within that dependency.
The only solutions I have found are
--config node_modules/module-a/grunt.js
Neither seems ideal. Is there a better way?
Upvotes: 8
Views: 2836
Reputation: 263
Just a thought but have you looked at grunt-hub?
https://github.com/shama/grunt-hub
Upvotes: 3