gruntjs - Simple Grunt copy command not working -
i know there obvious i'm missing can't see it. have grunt copy file i'm running.
copy: { dev: { files: [ { expand: true, src: [ "../index.html", "../views/**", "../scripts/**", "../styles/**", "../data/**", "../images/**" ], dest: "../../iphone/www/" } ] } }
everytime run files go ../../iphone folder instead of ../../iphone/www folder. don't understand why it's copying 1 level when i'm saying copy www folder. again know i'm missing trivial , small, can't see it. in advance.
edit: found interesting. if add arbitrary folder after www (i.e. ../../iphone/www/assets) correctly copy www folder since it's 1 level assets , assets folder not created.
the grunt copy command will, default, replicate path of src dest.
in case, using ..
source (no pun intended) of problem.
you can work around using cwd
property
your task config like:
copy: { dev: { files: [{ cwd: '../', expand: true, src: ["index.html", "views/**", "scripts/**", "styles/**", "data/**", "images/**"], dest: "../../iphone/www/" }] } }
Comments
Post a Comment