diff --git a/Gruntfile.js b/Gruntfile.js index 5a707ff..58b8d9d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -25,10 +25,6 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-trimtrailingspaces'); grunt.loadNpmTasks('grunt-contrib-watch'); - var cwd = grunt.option('cwd'); grunt.registerTask('default', []); - grunt.registerTask('fixwhitespace', function() { - grunt.config.set('cwd', cwd); - grunt.task.run('trimtrailingspaces'); - }); + grunt.loadTasks('tasks'); }; diff --git a/tasks/fixwhitespace.js b/tasks/fixwhitespace.js new file mode 100644 index 0000000..bc4bf5a --- /dev/null +++ b/tasks/fixwhitespace.js @@ -0,0 +1,7 @@ +module.exports = function(grunt) { + grunt.registerTask('fixwhitespace', function() { + var cwd = grunt.option('cwd'); + grunt.config.set('cwd', cwd); + grunt.task.run('trimtrailingspaces'); + }); +};