{"id":13565577,"url":"https://github.com/elwin013/parcel-plugin-static-files-copy","last_synced_at":"2025-10-04T00:35:35.817Z","repository":{"id":32695989,"uuid":"140191873","full_name":"elwin013/parcel-plugin-static-files-copy","owner":"elwin013","description":"ParcelJS plugin to copy static files","archived":false,"fork":false,"pushed_at":"2022-12-08T08:05:57.000Z","size":357,"stargazers_count":225,"open_issues_count":0,"forks_count":22,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-17T13:05:24.817Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elwin013.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["elwin013"]}},"created_at":"2018-07-08T18:20:34.000Z","updated_at":"2025-08-14T09:45:39.000Z","dependencies_parsed_at":"2023-01-14T21:57:35.127Z","dependency_job_id":null,"html_url":"https://github.com/elwin013/parcel-plugin-static-files-copy","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/elwin013/parcel-plugin-static-files-copy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elwin013%2Fparcel-plugin-static-files-copy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elwin013%2Fparcel-plugin-static-files-copy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elwin013%2Fparcel-plugin-static-files-copy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elwin013%2Fparcel-plugin-static-files-copy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elwin013","download_url":"https://codeload.github.com/elwin013/parcel-plugin-static-files-copy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elwin013%2Fparcel-plugin-static-files-copy/sbom","scorecard":{"id":374229,"data":{"date":"2025-08-11","repo":{"name":"github.com/elwin013/parcel-plugin-static-files-copy","commit":"7452db085082ce5834d19243b7671be8bac5acb2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"57 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-257v-vj4p-3w2h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-7r28-3m3f-r2pr","Warn: Project is vulnerable to: GHSA-r8j5-h5cx-65gg","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-92xj-mqp7-vmcj","Warn: Project is vulnerable to: GHSA-wxgw-qj99-44c2","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T13:50:03.017Z","repository_id":32695989,"created_at":"2025-08-18T13:50:03.017Z","updated_at":"2025-08-18T13:50:03.017Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278250015,"owners_count":25955839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T13:01:50.505Z","updated_at":"2025-10-04T00:35:35.781Z","avatar_url":"https://github.com/elwin013.png","language":"JavaScript","funding_links":["https://github.com/sponsors/elwin013"],"categories":["Plugins","JavaScript"],"sub_categories":["Other"],"readme":"# parcel-plugin-static-files-copy\n\nParcelJS plugin to copy static files from some directory to directory with bundle.\n\n### Looking for the ParcelV2 plugin? Check out [parcel-reporter-static-files-copy](https://github.com/elwin013/parcel-reporter-static-files-copy)\n\n## Install\n\n```\nyarn add parcel-plugin-static-files-copy --dev\n```\n\n```\nnpm install -D parcel-plugin-static-files-copy\n```\n\n## Usage\n\n1. Create `static` directory in you project root.\n2. Fill it with your static files\n3. Run build - and that's all!\n\n## Customization\n\nBeyond the default settings, you can:\n\n1. Name of the directory to be copied.\n2. Copy single files.\n3. Copy multiple directories.\n4. Copy from a different directory based on different output directory.\n5. Watch for changes during development (rebuilding when necessary).\n6. Exclude paths from copying.\n\n### Example\n\nThe following configures the plugin to copy all files in `public` to the build directory and watch for changes \nin all source files (`**` is a deep wildcard).\n\n```json\n// package.json\n{\n\t...\n    \"staticFiles\": {\n        \"staticPath\": \"public\",\n        \"watcherGlob\": \"**\"\n    }\n}\n```\n\n### Multiple Static Directories\n\nTo copy more than one directory to the build directory, specify `staticPath` as an array. The following copies \n`public` and `vendor/public`:\n\n```json\n// package.json\n{\n\t...\n    \"staticFiles\": {\n        \"staticPath\": [\"public\", \"vendor/public\"]\n    }\n}\n```\n\n### Copying single files\n\nTo copy single file (instead of content of directory) just pass path to a file instead of directory.  \n\n```json\n// package.json\n{\n\t...\n    \"staticFiles\": {\n        \"staticPath\": [\"path/to/a/file.txt\"]\n    }\n}\n```\n\n### Different source of static files based on output directory\n\nTo copy different files (from different directories) based on output directory (e.g. `--out-dir dist1` and `--out-dir dist2`) \nmake `staticPath` a object:\n\n```json\n// package.json\n{\n    ...\n    \"staticFiles\": {\n        \"staticPath\": [\n            {\n                \"outDirPattern\": \"**/dist1\",\n                \"staticPath\": \"static1\"\n            },\n            {\n                \"outDirPattern\": \"**/dist2\",\n                \"staticPath\": \"static2\"\n            }\n        ]\n  },\n}\n```\n\n### Specify directory to copy static files into\n\nIf you want your files from `staticPath` to get copied into a subdirectory inside the parcel `--out-dir`, make \n`staticPath` an object with `staticOutDir` key:\n\n```json\n// package.json\n{\n    ...\n    \"staticFiles\": {\n        \"staticPath\": [\n            {\n                \"staticPath\": \"static1\",\n                \"staticOutDir\": \"vendor\"\n            }\n        ]\n  },\n}\n```\n\nCopies files from `static1` into the `vendor` directory inside the `--out-dir`.\n\n### Watching for Changes\n\nParcel can rebuild your bundle(s) whenever changes occur in the static directory. This is disabled by default, but it \ncan be enabled by specifying a glob pattern for files that should be watched.\n\nNote the relative file path is used in matching (not just the file name). To match filenames in deep directories, \nstart with a \"globstar\" (double star). The plugin uses Node's built-in [Minimatch Library](https://github.com/isaacs/minimatch) \nfor glob matching.\n\nThe following watches all XML files in the static directory:\n\n```json\n// package.json\n{\n    ...\n    \"staticFiles\": {\n        \"staticPath\": \"public\",\n        \"watcherGlob\": \"**/*.xml\"\n    }\n}\n```\n\nTo disable watching, either remove the `\"watcherGlob\"` key (disabled is the default) or set it to false/null/undefined:\n\n```json\n// package.json\n{\n    ...\n    \"staticFiles\": {\n        \"staticPath\": \"public\",\n        \"watcherGlob\": false\n    }\n}\n```\n\n### Excluding paths\n\nYou can exclude files and directories in your `staticPath` from getting copied to the `outDir` by specifying `excludeGlob`:\n\n```json\n// package.json\n{\n    ...\n    \"staticFiles\": {\n        \"staticPath\": \"public\",\n        \"excludeGlob\": \"**/*.md\"\n    }\n}\n```\n\nExcludes all `.md` files in the `public` path from getting copied.\n\n\nMultiple `excludeGlob`s are possible by specifying it as array:\n\n```json\n// package.json\n{\n\t...\n    \"staticFiles\": {\n        \"staticPath\": \"public\",\n        \"excludeGlob\": [\"docs\", \"docs/**\"]\n    }\n}\n```\n\nExcludes the `docs` directory and all files inside the `docs` directory from getting copied.\n\n\n### Including paths\n\nYou can use the `excludeGlob` and negate it to achieve including behavior:\n\n\n```json\n// package.json\n{\n    ...\n    \"staticFiles\": {\n        \"staticPath\": \"src\",\n        \"excludeGlob\": \"**/!(locales)/*.+(!(txt)|!(json))\"\n    }\n}\n```\n\nIncludes only files from `locales` directory with `.txt` or `.json` extension.\n\n\n### Minimatch glob options\n\nPassing [options into minimatch](https://github.com/isaacs/minimatch#options) to change `watcherGlob` and `excludeGlob` \nbehavior is possible by specifying a `globOptions` object:\n\n```json\n// package.json\n{\n    ...\n    \"staticFiles\": {\n        \"staticPath\": \"public\",\n        \"excludeGlob\": [\"test\", \"test/**\"],\n        \"globOptions\": {\n            \"dot\": true\n        }\n    }\n}\n```\n\nExcludes the `test` directory and all files inside the `test` directory, including files starting with a dot, from \ngetting copied.\n\n### Dev and production config using NODE_ENV\n\nYou can use `env` parameter in `staticPath` object to select static path used in environment chosen by passing `NODE_ENV`:\n\n```json\n// package.json\n{\n    ...\n      \"scripts\": {\n        \"build:dev\": \"NODE_ENV=dev parcel build src/index.html\",\n        \"build:prod\": \"NODE_ENV=prod parcel build src/index.html\"\n      },\n    ...\n      \"staticFiles\": {\n        \"staticPath\": [\n          {\n            \"staticPath\": \"static-dev\",\n            \"env\": \"dev\"\n          },\n          {\n            \"staticPath\": \"static-prod\",\n            \"env\": \"prod\"\n          }\n        ]\n      }\n}\n```\n\nThen running:\n* `build:dev` will copy files from `static-dev` only,\n* `build:prod` will copy files from `static-prod` only.\n\nYou can specify from zero to many static paths per environment.\n\n### Additional examples\n\nCheck [examples](https://github.com/elwin013/parcel-plugin-static-files-copy/tree/master/examples) directory for \nadditional examples. \n\n## Contribute\n\nAre you interested in contributing? Awesome! Fork, make change, commit and create pull request. I'll do my best to merge \nchanges!\n\n## License\n\n[MIT](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felwin013%2Fparcel-plugin-static-files-copy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felwin013%2Fparcel-plugin-static-files-copy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felwin013%2Fparcel-plugin-static-files-copy/lists"}