Add build option to touch web.config automatically on deploy

This commit is contained in:
Tom Fulton
2014-01-12 04:40:27 -07:00
parent 628fa750ba
commit bffdc7f644
3 changed files with 15 additions and 4 deletions
+10 -2
View File
@@ -52,6 +52,13 @@ module.exports = function(grunt) {
},
touch: {
options: {},
webconfig: {
src: ['D:\\dev\\projects\\imulus-neue\\src\\imulus.umbraco\\web.config']
}
},
less: {
build: {
options: {
@@ -87,9 +94,10 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-touch');
grunt.registerTask('deploy', ['default', 'copy:deploy']);
grunt.registerTask('touchwebconfigifenabled', function() { if (grunt.option("touch")) grunt.task.run("touch:webconfig") });
grunt.registerTask('deploy', ['default', 'copy:deploy', 'touchwebconfigifenabled']);
grunt.registerTask('css:build', ['less']);
grunt.registerTask('js:build', ['concat']);
grunt.registerTask('default', ['clean', 'css:build', 'js:build', 'copy:main']);
+3 -1
View File
@@ -13,4 +13,6 @@ Archetype
## Deploy ##
grunt deploy --target=C:\\path\\to\\umbraco\\site
grunt watch:dev --target=C:\\path\to\\umbraco\\site
grunt watch:dev --target=C:\\path\to\\umbraco\\site
* Add `--touch` to either command to automatically touch the web.config on a deploy
+2 -1
View File
@@ -11,6 +11,7 @@
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-jshint": "~0.7.2",
"grunt-cli": "~0.1.11",
"grunt-contrib-clean": "~0.5.0"
"grunt-contrib-clean": "~0.5.0",
"grunt-touch": "~0.1.0"
}
}