mklabs / node-build-script

MIT License
322 stars 55 forks source link

How to change the mkdir source directory? #47

Closed jahvi closed 12 years ago

jahvi commented 12 years ago

Is it possible to change the source directory of the mkdir task? I have my grunt.js file in a sub-folder so I need to tell it to go up one directory somehow.

mklabs commented 12 years ago

You should be able to. If you change the configuration to something like:

staging: 'temp/',
output: 'dist',

mkdirs: {
  staging: 'path/to/source',
  output: 'path/to/other/source'
},

The destination is resolved thanks to the subtarget value, meaning that mkdirs:staging will copy files to grunt.config('staging') == temp/.

The source directory is the value you passed to mkdirs.staging for the staging copy, relative to the current working directory.

jahvi commented 12 years ago

Perfect that worked, I got confused because of the excludes option

mklabs commented 12 years ago

I would be confused as well:) I'm currently making a first batch of docs updates, and will prob bump a new version and adjust the output of the generated Gruntfile during init.