yui/shifter — pull request #79 by derek (2013-04-30 23:43:03+00:00)
Title: Fix to obey --build-dir when copying files

Currently, Shifter does not obey the `--build-dir` option for any files it needs to generate with the `copy` directive. Note: In the core library, `copy` is only used in Uploader's [build.json](https://github.com/yui/yui3/blob/master/src/uploader/build.json#L6).

By not respecting `--build-dir`, everything outputs to the yui3 repo's root `/build/` directory.

For example...

yui3/src/uploader $ shifter --build-dir ../../foo
[... lots of Shifter output, including ...]
shifter [info] copying from /Users/derek/src/yui/yui3/src/uploader/swf/flashuploader.swf to /Users/derek/src/yui/yui3/build/uploader/assets/flashuploader.swf

# Now let's see what files ended up where?
yui/yui3/src/uploader $ ls -1 ../../foo/
uploader
uploader-flash
uploader-html5
uploader-queue

yui/yui3/src/uploader $ ls -1 ../../foo/uploader/
assets
uploader-coverage.js
uploader-debug.js
uploader-min.js
uploader.js

yui/yui3/src/uploader $ ls -1 ../../foo/uploader/assets/
uploader-flash-core.css

# Wait, where is flashuploader.swf?

yui3/src/uploader $ ls ../../build/uploader/assets/flashuploader.swf
../../build/uploader/assets/flashuploader.swf

After this update

yui/yui3/src/ $ find ../../foo -name *.swf
../../foo/build/uploader/assets/flashuploader.swf

This change will also require an update to any build.json files that utilize `copy` so the 2nd path will be relative to the output directory. See https://github.com/derek/yui3/commit/9eec5ed579ba014fd4650a6889c8b92faf71c71b