Last active
December 20, 2015 21:19
-
-
Save vladikoff/6196873 to your computer and use it in GitHub Desktop.
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
| // watch config | |
| watch: { | |
| options: { | |
| spawn: false // <--- important | |
| }, | |
| js: { | |
| files: '*.js', | |
| tasks: [] | |
| } | |
| } | |
| // watch event | |
| grunt.event.on('watch', function(action, filepath, target) { | |
| grunt.config(['log'], filepath); | |
| grunt.task.run('log'); | |
| }); | |
| // your task | |
| grunt.registerTask('log', 'Log stuff.', function() { | |
| var filepath = grunt.config.get('log')); | |
| // do stuff with filepath... | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment