diff --git a/Gruntfile.js b/Gruntfile.js index b54e48c..a17d6ee 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -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']); diff --git a/README.md b/README.md index 3f406f8..940bf26 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,6 @@ Archetype ## Deploy ## grunt deploy --target=C:\\path\\to\\umbraco\\site - grunt watch:dev --target=C:\\path\to\\umbraco\\site \ No newline at end of file + grunt watch:dev --target=C:\\path\to\\umbraco\\site + + * Add `--touch` to either command to automatically touch the web.config on a deploy \ No newline at end of file diff --git a/package.json b/package.json index 209ff87..8b9f64f 100644 --- a/package.json +++ b/package.json @@ -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" } }