mirror of
https://github.com/pa11y/pa11y-dashboard.git
synced 2025-09-24 22:31:15 +00:00
Add a watch task to recompile assets on change
This commit is contained in:
@@ -27,12 +27,20 @@ module.exports = function (grunt) {
|
||||
'public/css/main.css': 'public/less/main.less'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
less: {
|
||||
files: ['public/less/**/*.less'],
|
||||
tasks: ['less']
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-contrib-less');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
|
||||
grunt.registerTask('lint', ['jshint']);
|
||||
grunt.registerTask('compile', ['less']);
|
||||
|
@@ -60,6 +60,7 @@ Now you'll be able to run the following commands:
|
||||
$ grunt # Run the lint and test tasks together
|
||||
$ grunt lint # Run JSHint with the correct config
|
||||
$ grunt compile # Compile front-end assets
|
||||
$ grunt watch # Watch for file changes and compile assets
|
||||
```
|
||||
|
||||
Code with lint errors or failing tests will not be accepted, please use the build tools outlined above.
|
||||
|
@@ -34,6 +34,7 @@
|
||||
"grunt": "~0.4",
|
||||
"grunt-contrib-jshint": "~0.7",
|
||||
"grunt-contrib-less": "~0.8",
|
||||
"grunt-contrib-watch": "~0.5",
|
||||
"supervisor": "~0.5"
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user