-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add grunt watcher for development on resources.
This watcher triggers a shell command recooking the files whenever anything changes in resources. Otherwise the command has to be executed manually everytime one wants to see the effect in a running instance.
- Loading branch information
Matthias Osswald
committed
Nov 7, 2019
1 parent
7eaa972
commit a40e752
Showing
6 changed files
with
570 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,5 @@ src/ | |
var/ | ||
.sass-cache | ||
/.ruby-version | ||
Gruntfile.js | ||
node_modules | ||
package.json | ||
temp_resources |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module.exports = function(grunt) { | ||
|
||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
watch: { | ||
files: ['Gruntfile.js', 'ftw/**/*.js', 'ftw/**/*.css', 'ftw/**/*.scss'], | ||
tasks: ['cook_resources'] | ||
}, | ||
shell: { | ||
cook_resources: { | ||
command: './bin/upgrade recook --all' | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-shell'); | ||
|
||
grunt.registerTask('cook_resources', ['shell:cook_resources']); | ||
}; |
This file contains 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
This file contains 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
Oops, something went wrong.