1.0.8 • Published 11 years ago
relocate v1.0.8
relocate
Usage
relocate test test/unit --remove
or
relocate test.js test/unit.js --remove
flags
--removeor-rremove original files after moving--ignoreor-iignore file/dir defaults to ignoring.gitandnode_modules--transformor-tpath to transform module.--forceor-foverwrite existing files
transform and ignore can be added multiple times
relocate foo foo/bar -i test -i .git
transforms
transform paths should point to a module that exports a single function. this function is called with 4 arguments.
- content: the file content
- src: the original file location
- dest: the new file location
- done: callback that must be called with 2 arguments
- error: an error object or null
- content: the transformed content
API
###relocate(src, dest, options, done)
- src: the original file location
- dest: the new file location
- options: object
- force: boolean
- ignores: array of file or directory names
- transforms: array of functions
- remove: boolean
- done: callback