https://github.com/afeiship/archiver-webpack-plugin
Archiver webpack plugin.
https://github.com/afeiship/archiver-webpack-plugin
archiver package plugin tar webpack zip
Last synced: about 2 months ago
JSON representation
Archiver webpack plugin.
- Host: GitHub
- URL: https://github.com/afeiship/archiver-webpack-plugin
- Owner: afeiship
- License: mit
- Created: 2018-08-03T09:13:12.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-03-19T14:49:25.000Z (over 5 years ago)
- Last Synced: 2025-10-20T08:39:25.418Z (8 months ago)
- Topics: archiver, package, plugin, tar, webpack, zip
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# archiver-webpack-plugin
> Archiver webpack plugin.
## installation
```shell
npm install -D @jswork/archiver-webpack-plugin
```
## usage
```js
import ArchiverWebpackPlugin from '@jswork/archiver-webpack-plugin';
// plugins:
plugiins:[
new ArchiverWebapckPlugin({
transform: function (inValue) {
return 'app/' + inValue;
},
output: function (inPath, inExt) {
return inPath.replace('dist', 'dist/app') + inExt;
}
})
]
```
## options
| Name | Type | Default | Description |
| :------------ | :------- | :--------------------------------- | :----------------------------------- |
| format | String | tar | archiver format options |
| formatOptions | Object | { gzip: true, zlib: { level: 9 } } | archiver options |
| transform | Function | - | `replace` to transform package path. |
| output | Function | - | `replace` to output package path. |
| ext | String | .tar.gz | Package extention |
## resources
- https://github.com/Seldszar/archiver-webpack-plugin
- https://archiverjs.com/docs/#quick-start