
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
parcel-reporter-static-files-copy
Advanced tools
ParcelJS v2 plugin to copy static files from static dir to bundle directory.
ParcelJS v2 plugin to copy static files from some directory to output dir. There is no watcher - files are copied on the build finish.
yarn add parcel-reporter-static-files-copy --dev
npm install -D parcel-reporter-static-files-copy
static directory in your project root..parcelrc:{
"extends": ["@parcel/config-default"],
"reporters": ["...", "parcel-reporter-static-files-copy"]
}
PLEASE NOTE: "..." is not a placeholder - it is used to extend the default list of
plugins (reporters in this case). Please see
Parcel's plugins documentation for more information.
static directory will end up in dist!Beyond the default settings, you can:
// package.json
{
...
"staticFiles": {
"staticPath": "customStatic"
}
If files from staticPath needs to get copied into a subdirectory inside the dist dir -
staticOutPath can be used:
// package.json
{
...
"staticFiles": {
"staticOutPath": "vendor"
}
The destination of static files can be set in plugin configuration. It will override
--dist-dir parameter.
// package.json
{
...
"staticFiles": {
"distDir": "customDist"
}
staticFiles entry in package.json can be set to the array of configurations instead of a single config.
Thanks to that it is possible e.g. to copy files from different directories to the output package.
For example please see the example below with environmental variables.
Different static files/folders can be copied based on the environmental variables using env map for config.
There can be more than one variable to match - in that case, ALL must be the same.
If env map is omitted - file(s) will be always copied.
The example below - when NODE_ENV is set to production then production.txt will be copied and if set to development then development.txt:
// package.json
{
...
"staticFiles": [
{
"staticPath": "production.txt",
"env": {
"NODE_ENV": "production"
}
},
{
"staticPath": "development.txt",
"env": {
"NODE_ENV": "development"
}
}
]
Check examples directory for additional examples.
At this moment this plugin copies all static files from some static dir to the output (dist) directory. There is no watcher on static files - the only trigger is finishing the build (no matter if normal build or serving).
You're interested in contributing? Awesome! Fork, make changes, commit and create pull requests. I'll do my best to merge changes!
Special thanks to @gmougeolle.
FAQs
ParcelJS v2 plugin to copy static files from static dir to bundle directory.
The npm package parcel-reporter-static-files-copy receives a total of 10,806 weekly downloads. As such, parcel-reporter-static-files-copy popularity was classified as popular.
We found that parcel-reporter-static-files-copy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.