Add build option to touch web.config automatically on deploy
This commit is contained in:
+10
-2
@@ -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']);
|
||||
|
||||
@@ -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
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user