{"id":29138758,"url":"https://github.com/mentaljam/rollup-plugin-copy2","last_synced_at":"2025-06-30T14:11:33.057Z","repository":{"id":49005689,"uuid":"174341726","full_name":"mentaljam/rollup-plugin-copy2","owner":"mentaljam","description":"Rollup plugin to copy additional assets to the build directory.","archived":false,"fork":false,"pushed_at":"2024-09-23T23:02:02.000Z","size":55,"stargazers_count":3,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-24T17:18:33.986Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/rollup-plugin-copy2","language":"TypeScript","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/mentaljam.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":"2019-03-07T12:40:21.000Z","updated_at":"2025-03-12T21:42:06.000Z","dependencies_parsed_at":"2024-06-19T05:30:45.833Z","dependency_job_id":"2b3229ab-4e10-412b-b5eb-11d8a8cb1b6a","html_url":"https://github.com/mentaljam/rollup-plugin-copy2","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mentaljam/rollup-plugin-copy2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mentaljam%2Frollup-plugin-copy2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mentaljam%2Frollup-plugin-copy2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mentaljam%2Frollup-plugin-copy2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mentaljam%2Frollup-plugin-copy2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mentaljam","download_url":"https://codeload.github.com/mentaljam/rollup-plugin-copy2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mentaljam%2Frollup-plugin-copy2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262788745,"owners_count":23364399,"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":[],"created_at":"2025-06-30T14:11:12.094Z","updated_at":"2025-06-30T14:11:33.044Z","avatar_url":"https://github.com/mentaljam.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rollup-plugin-copy2\n\n[Rollup](https://github.com/rollup/rollup) plugin to copy additional assets\nto the build directory.\n\nThis plugin actually does not copy assets by default but adds them to the resulting bundle\nso they could be accessed by other plugins (for example by the\n[rollup-plugin-zip](https://github.com/mentaljam/rollup-plugin-zip)).\n\nThe actual copying is made by the Rollup itself.\n\n## Install\n\n```sh\nnpm i -D rollup-plugin-copy2\n```\n\n## Usage\n\n```js\n// rollup.config.js\n\nimport {copy} from 'rollup-plugin-copy2'\n\nexport default {\n  input: 'index.js',\n  output: {\n    dir: 'dist',\n    format: 'es',\n  },\n  plugins: [\n    copy({\n      assets: [\n        'README.md',\n        ['data.txt', 'assets/data.txt'],\n      ]\n    }),\n  ],\n}\n```\n\n## Options\n\n### assets\n\n#### Type\n\n```js\n(string | [string, string])[]\n```\n\nAn array of assets to copy. Each entry can be\n- a `string` that contains a relative path to the source file\n- a [glob](https://github.com/isaacs/node-glob) compatible path resulting to one or some files like `node_modules/static-deps/**/*.css`\n- a pair of strings `[string, string]` that contains relative paths to the source (not glob ones) and destination files.\n\nIf an entry is a single string then the destination file path will be equal to it\n(relative to the output directory).\n\n### notEmitFiles\n\n#### Type\n\n```js\nboolean?\n```\n\nDo not emit files with Rollup. Use this option with [outputDirectory](#outputDirectory)\nif you only want to copy files to a specific directory.\n\n### outputDirectory\n\n#### Type\n\n```js\nstring?\n```\n\nA path to the additional output directory in case you want to write copied files on disk.\n\nIf not set, the files are only emitted to the others plugins.\n\n## License\n\n[MIT](LICENSE) © [Petr Tsymbarovich](mailto:petr@tsymbarovich.ru)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmentaljam%2Frollup-plugin-copy2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmentaljam%2Frollup-plugin-copy2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmentaljam%2Frollup-plugin-copy2/lists"}