parcel-reporter-copy-file-v2
v1.0.1
Published
Reporter to copy static files for Parcel v2
Downloads
8
Maintainers
Readme
parcel-reporter-copy-file-v2
Reporter to copy static files for Parcel V2 (buildSuccess event)
Install
Using npm:
npm install -D parcel-reporter-copy-file-v2
Using yarn:
yarn add -D parcel-reporter-copy-file-v2
Using bower:
bower install -D parcel-reporter-copy-file-v2
Configuration
First of all, add a new reporter in the Parcel config.
.parcelrc
{
"extends": ["@parcel/config-default"],
"reporters": ["parcel-reporter-copy-file-v2"]
}
Then define config to copy static files in the package.json of the project
package.json
{
...
"copyStaticFiles": [
"files/file1.txt",
"files/embed/*.txt",
{ "from": "files/file1.txt", "to": "results1" },
{ "from": "files/embed/*", "to": "results2" },
{ "from": "files/**/*", "to": "results3" }
]
}
from
Type: String
Required: true
Glob or relative path from where we copy files (root path taked from Parcel projectRoot config key)
to
Type: String|Array<String>
Default: Parcel dist folders configuration
Output relative path (root path taked from Parcel projectRoot config key)
Requirements
Contributing
Any contribution is highly appreciated.
Licensing
The code in this project is licensed under MIT license.