Package Exports
- copy-files-from-to
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (copy-files-from-to) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
copy-files-from-to
Copy files from one path to another.
Installation
$ npm install -g copy-files-from-to
Usage
Create a file, say list.json
which looks like:
[
{
"from": "node_modules/jquery/dist/jquery.js",
"to": "http-pub/3rdparty/jquery/jquery.js"
},
{
"from": {
"default": "node_modules/react/dist/react.js",
"prod": "node_modules/react/dist/react.min.js"
},
"to": "http-pub/3rdparty/react/react.js"
}
]
Command
$ copy-files-from-to list.json
Output
Copying node_modules/jquery/dist/jquery.js to http-pub/3rdparty/jquery/jquery.js ✓
Copying node_modules/react/dist/react.js to http-pub/3rdparty/react/react.js ✓
Also try out
$ copy-files-from-to list.json prod
Starting copy operation in "prod" mode: (overwrite option is on)
Copying node_modules/jquery/dist/jquery.js to http-pub/3rdparty/jquery/jquery.js ✓
Copying node_modules/react/dist/react.min.js to http-pub/3rdparty/react/react.js ✓
Use cases
- This tool is useful when a small set of files needs to be copied.
- This works as a basic alternative for bower where you wish to copy the scripts out of node_modules folder.