Created
December 17, 2012 02:00
-
-
Save ginpei/4315275 to your computer and use it in GitHub Desktop.
`grunt.loadTasks('foo')` loads all JS files under directory `foo`, not `tasks/foo.js` with grunt v0.4.0rc2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./Gruntfile.js | |
module.exports = function(grunt) { | |
grunt.loadTasks('hoge'); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ grunt hoge | |
`hoge/xxx.js` is loaded! | |
Running "hoge" task | |
Hello, hoge world! | |
Done, without errors. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./hoge/xxx.js | |
module.exports = function(grunt) { | |
console.log('`hoge/xxx.js` is loaded!'); | |
grunt.registerTask('hoge', function() { | |
console.log('Hello, hoge world!'); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you know, i needed to search for this again, and just noticed my own comment from last year...
7 years, going strong.