gruntjs - Passing arguments from command line to grunt copy task -


var pathvalue="";  module.exports = function(grunt) {     grunt.initconfig({         copy: {             main: {                 files: [{                     cwd: 'srcpath',  // set working folder / root copy                     src: '**/*',           // copy files , subfolders                     dest: 'pathvalue',    // destination folder                     expand: true                 }]             }         }     });      grunt.loadnpmtasks('grunt-contrib-copy');     grunt.registertask('copy', function(n) {         var target = grunt.option('target');         pathvalue = target;         // useful target here     });  }; 

i'm trying pass destination path copy task command line. tired command

grunt copy --target=destpath

it says "done without errors" new folder not getting created in destination directory. can please tell me what's error in code?

try changing dest qualified js file path. this:

dest: 'dest/bob.js' 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -