Skip to content

Instantly share code, notes, and snippets.

@svinkle
Created June 13, 2013 19:18
Show Gist options
  • Save svinkle/5776533 to your computer and use it in GitHub Desktop.
Save svinkle/5776533 to your computer and use it in GitHub Desktop.
Small gruntfile.js example on copying files to another server via mapped Windows drive. https://npmjs.org/package/grunt-contrib-copy
module.exports = function(grunt) {
// main config
grunt.initConfig({
copy: {
main: {
files: [
{src: ['css/main.css'], dest: 'Z:/www/css/main.css', filter: 'isFile'},
{src: ['js/main.js'], dest: 'Z:/www/js/main.js', filter: 'isFile'}
]
}
},
watch: {
files: ['css/main.css', 'js/main.js'],
tasks: ['copy']
}
});
// laod the tasks
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
// run the task
grunt.registerTask('default', ['copy', 'watch']);
};
@marcuscaum
Copy link

doesn't work bro...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment