{"id":21569282,"url":"https://github.com/ecliptic/webpack-blocks-copy","last_synced_at":"2026-05-20T02:41:06.868Z","repository":{"id":143928149,"uuid":"88313906","full_name":"ecliptic/webpack-blocks-copy","owner":"ecliptic","description":"DEPRECATED: Merged into webpack-blocks-utils","archived":false,"fork":false,"pushed_at":"2017-06-01T05:14:48.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-02T05:39:55.330Z","etag":null,"topics":["copy-webpack-plugin","webpack","webpack-blocks"],"latest_commit_sha":null,"homepage":"https://github.com/ecliptic/webpack-blocks-utils","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/ecliptic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-15T00:49:54.000Z","updated_at":"2017-06-01T05:14:11.000Z","dependencies_parsed_at":"2023-09-18T05:00:06.733Z","dependency_job_id":null,"html_url":"https://github.com/ecliptic/webpack-blocks-copy","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecliptic%2Fwebpack-blocks-copy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecliptic%2Fwebpack-blocks-copy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecliptic%2Fwebpack-blocks-copy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecliptic%2Fwebpack-blocks-copy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecliptic","download_url":"https://codeload.github.com/ecliptic/webpack-blocks-copy/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244166641,"owners_count":20409178,"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","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":["copy-webpack-plugin","webpack","webpack-blocks"],"created_at":"2024-11-24T11:09:03.378Z","updated_at":"2026-05-20T02:41:01.849Z","avatar_url":"https://github.com/ecliptic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webpack-blocks-copy\n\nA [webpack-block](https://github.com/andywer/webpack-blocks) for [copy-webpack-plugin](https://github.com/kevlened/copy-webpack-plugin).\n\n[![CircleCI](https://circleci.com/gh/ecliptic/webpack-blocks-copy.svg?style=shield\u0026circle-token=:circle-token)](https://circleci.com/gh/ecliptic/webpack-blocks-copy)\n[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)\n[![NPM Version](https://img.shields.io/npm/v/webpack-blocks-copy.svg)](https://www.npmjs.com/package/webpack-blocks-copy)\n\n*Version compatibility:*\n\n* webpack-blocks v0._x_ -\u003e webpack-blocks-copy [v1._x_](https://github.com/ecliptic/webpack-blocks-copy/tree/master) (@latest)\n* webpack-blocks v1._x_ -\u003e DEPRECATED: Merged into [webpack-blocks-utils](https://github.com/ecliptic/webpack-blocks-utils)\n\n## Installation\n\n```sh\n$ yarn add --dev webpack-blocks-copy\n```\n\nor\n\n```sh\n$ npm install --save-dev webpack-blocks-copy\n```\n\n## Usage\n\nThe most basic way to use the plugin is to import `copy` and use it to define simple *from*, *to* pairs that are added to the list of patterns used when the plugin is instantiated.\n\n```js\nimport {createConfig, entryPoint, setOutput} from '@webpack-blocks/webpack2'\nimport babel from '@webpack-blocks/babel6'\nimport {copy} from './src/webpack-block-copy'\n\nexport default createConfig([\n  entryPoint(['babel-polyfill', './src/Main.js']),\n  setOutput('./build/bundle.js'),\n  babel(),\n  copy('assets/robots.txt', 'robots.txt'),\n  copy('assets/favicon.ico', 'favicon.ico'),\n])\n```\n\nThis would result in the following copy plugin config:\n\n```js\nnew CopyWebpackPlugin([\n  {from: 'assets/robots.txt', to: 'robots.txt'},\n  {from: 'assets/favicon.ico', to: 'favicon.ico'},\n])\n```\n\n### Advanced patterns\n\nIf you need to use more advanced patterns, described [here](https://github.com/kevlened/copy-webpack-plugin#pattern-properties), use the `copyPattern` function:\n\n```js\nimport {createConfig} from '@webpack-blocks/webpack2'\nimport {copyPattern} from './src/webpack-block-copy'\n\nexport default createConfig([\n  copyPattern({\n    context: 'from/directory',\n    from: '**/*',\n    to: '/absolute/path',\n  }),\n])\n```\n\n### Options\n\nIf you need to set options, use the `copyOptions` function:\n\n```js\nimport {createConfig} from '@webpack-blocks/webpack2'\nimport {copyOptions} from './src/webpack-block-copy'\n\nexport default createConfig([\n  copyOptions({copyUnmodified: true}),\n])\n```\n\nSee the options list [here](https://github.com/kevlened/copy-webpack-plugin#available-options).\n\n## License\n\nThis project is licensed under [MIT](https://github.com/ecliptic/webpack-blocks-html/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecliptic%2Fwebpack-blocks-copy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecliptic%2Fwebpack-blocks-copy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecliptic%2Fwebpack-blocks-copy/lists"}