├── examples ├── .gitignore ├── simple │ ├── static │ │ ├── test2.txt │ │ ├── test1.txt │ │ └── dir │ │ │ └── test2.txt │ ├── src │ │ └── index.html │ └── package.json ├── multiple-nested-config │ ├── assets │ │ ├── bbb.txt │ │ ├── aaa.txt │ │ └── ccc.txt │ ├── src │ │ └── index.html │ └── package.json ├── simple-custom-out-dir │ ├── assets │ │ └── bbb.txt │ ├── src │ │ └── client │ │ │ └── index.html │ └── package.json ├── single-files │ ├── static │ │ ├── test1.txt │ │ └── dir │ │ │ └── test2.txt │ ├── src │ │ └── index.html │ └── package.json ├── multiple-staticpath │ ├── public │ │ └── public.txt │ ├── static │ │ ├── test1.txt │ │ └── dir │ │ │ └── test2.txt │ ├── src │ │ └── index.html │ └── package.json ├── multiple-entry-points │ ├── static │ │ ├── test1.txt │ │ └── dir │ │ │ └── test2.txt │ ├── src │ │ ├── a │ │ │ └── index.html │ │ └── b │ │ │ └── index.html │ └── package.json ├── multiple-environments │ ├── static-dev │ │ └── dev.txt │ ├── static-prod │ │ └── prod.txt │ ├── static-dev2 │ │ └── additional-from-dev2.txt │ ├── src │ │ └── index.html │ └── package.json └── multiple-entry-points-with-common-static │ ├── static │ ├── test1.txt │ └── dir │ │ └── test2.txt │ ├── src │ ├── a │ │ └── index.html │ └── b │ │ └── index.html │ └── package.json ├── .github └── FUNDING.yml ├── .gitignore ├── .npmrc ├── .npmignore ├── .eslintrc.js ├── package.json ├── LICENSE ├── README.md └── index.js /examples/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | .cache -------------------------------------------------------------------------------- /examples/simple/static/test2.txt: -------------------------------------------------------------------------------- 1 | test2 -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [elwin013] 2 | -------------------------------------------------------------------------------- /examples/simple/static/test1.txt: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .vscode 3 | .idea -------------------------------------------------------------------------------- /examples/multiple-nested-config/assets/bbb.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/simple-custom-out-dir/assets/bbb.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/simple/static/dir/test2.txt: -------------------------------------------------------------------------------- 1 | dir/test2 -------------------------------------------------------------------------------- /examples/single-files/static/test1.txt: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | sign-git-tag=true 2 | sign-git-commit=true 3 | -------------------------------------------------------------------------------- /examples/multiple-nested-config/assets/aaa.txt: -------------------------------------------------------------------------------- 1 | asdf -------------------------------------------------------------------------------- /examples/multiple-nested-config/assets/ccc.txt: -------------------------------------------------------------------------------- 1 | ccc -------------------------------------------------------------------------------- /examples/multiple-staticpath/public/public.txt: -------------------------------------------------------------------------------- 1 | public -------------------------------------------------------------------------------- /examples/single-files/static/dir/test2.txt: -------------------------------------------------------------------------------- 1 | test2 2 | -------------------------------------------------------------------------------- /examples/multiple-entry-points/static/test1.txt: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /examples/multiple-staticpath/static/test1.txt: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | examples 2 | node_modules 3 | .vscode 4 | .idea 5 | -------------------------------------------------------------------------------- /examples/multiple-entry-points/static/dir/test2.txt: -------------------------------------------------------------------------------- 1 | test2 2 | -------------------------------------------------------------------------------- /examples/multiple-environments/static-dev/dev.txt: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /examples/multiple-environments/static-prod/prod.txt: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /examples/multiple-staticpath/static/dir/test2.txt: -------------------------------------------------------------------------------- 1 | test2 2 | -------------------------------------------------------------------------------- /examples/multiple-environments/static-dev2/additional-from-dev2.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/multiple-entry-points-with-common-static/static/test1.txt: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /examples/multiple-entry-points-with-common-static/static/dir/test2.txt: -------------------------------------------------------------------------------- 1 | test2 2 | -------------------------------------------------------------------------------- /examples/simple/src/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /examples/single-files/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/multiple-staticpath/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/multiple-entry-points/src/a/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/multiple-entry-points/src/b/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/multiple-environments/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/multiple-nested-config/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/simple-custom-out-dir/src/client/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/multiple-entry-points-with-common-static/src/a/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/multiple-entry-points-with-common-static/src/b/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/multiple-staticpath/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multiple-staticpath", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "parcel build src/index.html" 8 | }, 9 | "staticFiles": { 10 | "staticPath": [ 11 | "static", 12 | "public" 13 | ], 14 | "watcherGlob": "**" 15 | }, 16 | "devDependencies": { 17 | "parcel-bundler": "1.12.4", 18 | "parcel-plugin-static-files-copy": "file:../.." 19 | }, 20 | "dependencies": {} 21 | } 22 | -------------------------------------------------------------------------------- /examples/simple/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "simple", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "parcel build src/index.html", 8 | "watch": "parcel src/index.html" 9 | }, 10 | "staticFiles": { 11 | "staticPath": [ 12 | "static", 13 | "static" 14 | ], 15 | "watcherGlob": "**" 16 | }, 17 | "devDependencies": { 18 | "parcel-bundler": "1.12.4", 19 | "parcel-plugin-static-files-copy": "file:../.." 20 | }, 21 | "dependencies": {} 22 | } 23 | -------------------------------------------------------------------------------- /examples/multiple-entry-points/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multiple-entry-points", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "parcel build src/*/index.html" 8 | }, 9 | "staticFiles": { 10 | "staticPath": [ 11 | { 12 | "staticPath": "static", 13 | "staticOutDir": "assets" 14 | } 15 | ] 16 | }, 17 | "devDependencies": { 18 | "parcel-bundler": "1.12.4", 19 | "parcel-plugin-static-files-copy": "file:../.." 20 | }, 21 | "dependencies": {} 22 | } 23 | -------------------------------------------------------------------------------- /examples/multiple-entry-points-with-common-static/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multiple-entry-points-with-common-static", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "parcel build src/*/index.html" 8 | }, 9 | "staticFiles": { 10 | "staticPath": [ 11 | { 12 | "staticPath": "static", 13 | "staticOutDir": "/assets" 14 | } 15 | ] 16 | }, 17 | "devDependencies": { 18 | "parcel-bundler": "1.12.4", 19 | "parcel-plugin-static-files-copy": "file:../.." 20 | }, 21 | "dependencies": {} 22 | } 23 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "env": { 3 | "es6": true, 4 | "node": true 5 | }, 6 | "extends": "eslint:recommended", 7 | "parserOptions": { 8 | "ecmaVersion": 2017 9 | }, 10 | "rules": { 11 | "indent": [ 12 | "error", 13 | 4 14 | ], 15 | "linebreak-style": [ 16 | "error", 17 | "unix" 18 | ], 19 | "quotes": [ 20 | "error", 21 | "single" 22 | ], 23 | "semi": [ 24 | "error", 25 | "always" 26 | ], 27 | "no-console": "off", 28 | } 29 | }; -------------------------------------------------------------------------------- /examples/simple-custom-out-dir/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "simple-custom-out-dir", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "parcel build src/client/index.html -d dist/client", 8 | "watch": "parcel src/client/index.html -d dist/client" 9 | }, 10 | "staticFiles": { 11 | "staticPath": [ 12 | { 13 | "staticPath": "assets", 14 | "staticOutDir": "assets" 15 | } 16 | ], 17 | "watcherGlob": "**" 18 | }, 19 | "devDependencies": { 20 | "parcel-bundler": "1.12.4", 21 | "parcel-plugin-static-files-copy": "file:../.." 22 | }, 23 | "dependencies": {} 24 | } 25 | -------------------------------------------------------------------------------- /examples/single-files/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "simple", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "parcel build src/index.html", 8 | "serve": "parcel src/index.html" 9 | }, 10 | "staticFiles": { 11 | "staticPath": [ 12 | { 13 | "staticPath": "static/test1.txt", 14 | "staticOutDir": "test1" 15 | }, 16 | { 17 | "staticPath": "static/dir/test2.txt" 18 | } 19 | ], 20 | "watcherGlob": "**" 21 | }, 22 | "devDependencies": { 23 | "parcel-bundler": "1.12.4", 24 | "parcel-plugin-static-files-copy": "file:../.." 25 | }, 26 | "dependencies": {} 27 | } 28 | -------------------------------------------------------------------------------- /examples/multiple-environments/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multiple-environments", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "build:dev": "NODE_ENV=dev parcel build src/index.html", 8 | "build:prod": "NODE_ENV=prod parcel build src/index.html" 9 | }, 10 | "staticFiles": { 11 | "staticPath": [ 12 | { 13 | "staticPath": "static-dev", 14 | "env": "dev" 15 | }, 16 | { 17 | "staticPath": "static-dev2", 18 | "env": "dev" 19 | }, 20 | { 21 | "staticPath": "static-prod", 22 | "env": "prod" 23 | } 24 | ], 25 | "watcherGlob": "**" 26 | }, 27 | "devDependencies": { 28 | "parcel-bundler": "1.12.4", 29 | "parcel-plugin-static-files-copy": "file:../.." 30 | }, 31 | "dependencies": {} 32 | } 33 | -------------------------------------------------------------------------------- /examples/multiple-nested-config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multiple-nested-config", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "NODE_ENV=dev parcel build src/index.html", 8 | "build-prod": "NODE_ENV=prod parcel build src/index.html" 9 | }, 10 | "staticFiles": { 11 | "staticPath": [ 12 | { 13 | "staticPath": [ 14 | "assets/aaa.txt", 15 | "assets/bbb.txt" 16 | ], 17 | "env": "dev", 18 | "staticOutDir": "vendor1" 19 | }, 20 | { 21 | "staticPath": [ 22 | "assets/bbb.txt", 23 | "assets/ccc.txt" 24 | ], 25 | "env": "prod", 26 | "staticOutDir": "vendor2" 27 | } 28 | ] 29 | }, 30 | "devDependencies": { 31 | "parcel-bundler": "1.12.4", 32 | "parcel-plugin-static-files-copy": "file:../.." 33 | }, 34 | "dependencies": {} 35 | } 36 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Kamil Banach", 4 | "email": "kontakt@elwin013.com" 5 | }, 6 | "bugs": { 7 | "url": "https://github.com/elwin013/parcel-plugin-static-files-copy/issues" 8 | }, 9 | "dependencies": { 10 | "minimatch": "3.0.4", 11 | "path": "0.12.7" 12 | }, 13 | "deprecated": false, 14 | "description": "ParcelJS plugin to copy static files from static dir to bundle directory.", 15 | "devDependencies": { 16 | "eslint": "5.12.0" 17 | }, 18 | "homepage": "https://github.com/elwin013/parcel-plugin-static-files-copy#readme", 19 | "keywords": [ 20 | "parcel" 21 | ], 22 | "license": "MIT", 23 | "main": "index.js", 24 | "name": "parcel-plugin-static-files-copy", 25 | "repository": { 26 | "type": "git", 27 | "url": "git+ssh://git@github.com/elwin013/parcel-plugin-static-files-copy.git" 28 | }, 29 | "scripts": { 30 | "test": "eslint index.js" 31 | }, 32 | "version": "2.6.0" 33 | } 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018-2020 Kamil Banach