@zilero/gulp-archive-creator
v1.0.4
Published
A Gulp plugin for creating archives (zip, tar) from vinyl file streams with configurable compression options
Maintainers
Readme
🗄️ Powerful Gulp plugin for creating archives (zip, tar, etc.) from your stream files.
Installation • Options • Example
✨ Features
- 📦 Support for multiple archive formats (zip, tar)
- 🔧 Highly configurable
- 📝 TypeScript support
- 🚀 Stream-based processing
- 💡 Progress logging
- 🛠️ Customizable compression options
🚀 Installation
npm install @zilero/gulp-archive-creator --save-dev
# or
yarn add @zilero/gulp-archive-creator --dev
# or
pnpm add @zilero/gulp-archive-creator --save-dev⚙️ Options
format
- Type:
string - Required:
true - Default:
'zip' - Supported formats:
'zip','tar'
archiveOptions
- Type:
ArchiverOptions - Required:
false - Options from archiver package
pluginOptions
- Type:
object - Required:
false
pluginOptions.archiveName
- Type:
string - Default:
'archive' - Archive name without extension
pluginOptions.createDirectory
- Type:
boolean - Default:
false - Create directory structure in archive
pluginOptions.createEmptyArchive
- Type:
boolean - Default:
false - Create archive even if no files were processed
📝 Example
gulp.task('create-archive', () => {
return gulp.src(['src/**/*', '!src/**/*.map'])
.pipe(GulpArchiveCreator({
format: 'zip',
archiveOptions: {
zlib: { level: 9 } // Maximum compression
},
pluginOptions: {
archiveName: 'project-build',
createEmptyArchive: false,
}
})
.pipe(gulp.dest('dist'));
});🤝 Contributing
If you would like to contribute to the project, please create a pull request or leave feedback. We are always open to new ideas and improvements!
🐛 Issues
Found a bug? Want to request a feature? Please create an issue.
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
Made with ❤️ by Zilero
