diff --git a/gruntfile.js b/gruntfile.js index 0a76f23..6b3c915 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -59,6 +59,19 @@ module.exports = function ( grunt ){ dest: 'css/cwv3.min.css', } }, + rsync: { + options: { + args: ["--verbose", "--archive"], + exclude: ["node_modules",".*","README.md"], + recursive: true + }, + dist: { + options: { + src: "./", + dest: "~/svn/content-warning-v2/" + } + } + }, watch: { gruntfile: { files: '<%= jshint.gruntfile.src %>', @@ -75,6 +88,10 @@ module.exports = function ( grunt ){ js: { files: ['js/*.js', '!js/*.min.js'], tasks: ['uglify'] + }, + readme: { + files: ['readme.txt', 'content-warning-v3.php'], + tasks: ['rsync'] } } }); @@ -85,7 +102,8 @@ module.exports = function ( grunt ){ grunt.loadNpmTasks('grunt-contrib-sass'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-cssmin'); + grunt.loadNpmTasks('grunt-rsync'); // Default task - grunt.registerTask('default', ['jshint', 'sass', 'uglify', 'cssmin']); + grunt.registerTask('default', ['jshint', 'sass', 'uglify', 'cssmin', 'rsync']); }; \ No newline at end of file diff --git a/package.json b/package.json index c957e04..83baae7 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "grunt-contrib-sass": "~0.7.3", "grunt-contrib-watch": "~0.6.1", "grunt-contrib-cssmin": "~0.10.0", - "grunt-contrib-uglify": "~0.5.0" + "grunt-contrib-uglify": "~0.5.0", + "grunt-rsync": "~0.6.1" } }