lundi 20 avril 2015

Javascript Grunt passing arguments for Tasks

I'm at the beginning with Grunt and I'm facing with this issue: I've to pass as argument two paths, but, also if the execution seems to be ok, the task doesn't really work... Any hints?

grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),

    copy: {
        backup: {
            files: [
                {expand: true, src: [process.argv[2]], dest: [process.argv[3]]},
            ],
        },
    },

If I try to run

grunt copy:backup:sourcefolder:destinationfolder

but the code executes without giving any result.

Thanks in advance for the help!

Aucun commentaire:

Enregistrer un commentaire