Grunt task to output log statements easily.
grunt.registerTask('build', [
'log:build started',
'jshint',
'less',
'log:hint and less done',
(... other build steps ...),
'log: build finished'
]);
You need node, npm, and grunt already installed, then:
npm install grunt-log --save-dev
Once the plugin has been installed, load it in your Gruntfile. I recommend load-grunt-tasks, but you can do it the traditional, painful way by adding to your Gruntfile:
grunt.loadNpmTasks('grunt-log');
Just call the log
task, with the message to log as its first parameter
(separated from the task by a :
), as part of your multi-step task definition:
grunt.registerTask('build', 'builds all elements', [
'prompt:bump',
'bump',
'log: now starting build',
'stage:prod',
'release',
'log: build successful',
]);
- fork it: https://github.com/xavierpriour/grunt-log/fork
- clone your fork.
- install everything:
npm install
- test everything is ok:
grunt
- this task will watch for file updates - add tests for your contribution - we use nodeunit
- have a go!
- ensure all tests run ok:
grunt test
- update that README
- create a pull request
- thank you so much!
1.0: log:(msg) (2015/06/12)
log:msg
will outputmsg
0.0: initial commit
- no code yet.
MIT © Xavier Priour