Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mentaljam/rollup-plugin-zip
Rollup plugin to zip up emitted files.
https://github.com/mentaljam/rollup-plugin-zip
emitted-files plugin rollup rollup-plugin zip
Last synced: 3 months ago
JSON representation
Rollup plugin to zip up emitted files.
- Host: GitHub
- URL: https://github.com/mentaljam/rollup-plugin-zip
- Owner: mentaljam
- License: mit
- Created: 2019-03-07T12:53:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-03T06:31:11.000Z (over 1 year ago)
- Last Synced: 2024-06-11T17:38:30.619Z (5 months ago)
- Topics: emitted-files, plugin, rollup, rollup-plugin, zip
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/rollup-plugin-zip
- Size: 124 KB
- Stars: 4
- Watchers: 2
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - zip - Pack all assets into a zip file. (Plugins / Output)
README
# rollup-plugin-zip
[Rollup](https://github.com/rollup/rollup) plugin to zip up emitted files.
This plugin was inspired by the
[zip-webpack-plugin](https://github.com/erikdesjardins/zip-webpack-plugin).rollup-plugin-zip doesn't list the output directory but gets entries from the
resulting bundle. Hence it doesn't archive any additional assets which was copied
to the output firectory manually. To handle additional assets use the
[rollup-plugin-copy2](https://github.com/mentaljam/rollup-plugin-copy2) plugin.## Install
```sh
npm i -D rollup-plugin-zip
```## Usage
```js
// rollup.config.jsimport zip from 'rollup-plugin-zip'
export default {
input: 'index.js',
output: {
dir: 'dist',
format: 'es',
},
plugins: [
zip(),
],
}
```## Options
### file
#### Type
```js
string
```#### Default
```js
`${npm_package_name}-${npm_package_version}.zip` || `bundle-${npm_package_version}.zip` || 'bundle.zip'
```Optional name or path to the output zip file. Relative paths are resolved in the Rollup destination directory.
To change the destination directory without changing the file name use the [dir option](#dir).### dir
#### Type
```js
string
```#### Default
Rollup destination directory if `file` is not set. If `file` is set then `dir` is ignored.
Optional path to the directory where to write the output zip file.
Relative paths are resolved in the package base directory.## License
[MIT](LICENSE) © [Petr Tsymbarovich](mailto:[email protected])