parcel-reporter-zephyr
v1.2.0
Published
Parcel reporter for Zephyr
Readme
Parcel Reporter Zephyr
Zephyr Cloud | Zephyr Docs | Discord | Twitter | LinkedIn
A Parcel reporter plugin for deploying applications with Zephyr Cloud. This plugin automatically handles the deployment process during your Parcel build.
Installation
# npm
npm install --save-dev parcel-reporter-zephyr
# yarn
yarn add --dev parcel-reporter-zephyr
# pnpm
pnpm add --dev parcel-reporter-zephyr
# bun
bun add --dev parcel-reporter-zephyrUsage
With .parcelrc (Recommended)
The easiest way to use the Zephyr Parcel plugin is to add it to your .parcelrc file:
// .parcelrc
{
"extends": "@parcel/config-default",
"reporters": ["...", "parcel-reporter-zephyr"]
}Programmatic Usage
If you're using Parcel programmatically, you can add the plugin directly:
// build.js
const { Parcel } = require('@parcel/core');
const ZephyrReporter = require('parcel-reporter-zephyr');
async function build() {
const bundler = new Parcel({
entries: ['src/index.html'],
defaultConfig: '@parcel/config-default',
reporters: ['...', ZephyrReporter],
});
await bundler.run();
}
build();Configuration
The plugin works out of the box with minimal configuration. It will automatically:
- Collect build assets and metadata
- Upload to Zephyr Cloud during the build process
- Enable deployment capabilities for your application
TAP package target
For a TAP package, use the programmatic reporter factory and select the tap-app
artifact family:
const { createZephyrReporter } = require('parcel-reporter-zephyr');
const reporter = createZephyrReporter({
target: 'tap-app',
mfConfigs: [
{ name: 'desktop', filename: 'targets/desktop/remoteEntry.mjs' },
{ name: 'quickjs', filename: 'targets/quickjs/remoteEntry.mjs' },
],
federation: [
{ name: 'desktop', remote: 'targets/desktop/remoteEntry.mjs', library_type: 'module' },
{ name: 'quickjs', remote: 'targets/quickjs/remoteEntry.mjs', library_type: 'module' },
],
});Both arrays must be non-empty, have the same containers, and pair each name with
filename === remote. The reporter rejects incomplete or mismatched TAP metadata. A
single valid container also supplies the legacy mfConfig; multi-container builds
retain only the full arrays rather than choosing an arbitrary container.
Features
- 🚀 Automatic deployment during build
- 📦 Asset optimization and caching
- 🔧 Zero-config setup
- 📊 Build analytics and monitoring
- 🌐 Global CDN distribution
Getting Started
- Install the plugin in your Parcel project
- Add it to your
.parcelrcconfiguration - Build your application as usual with
parcel build - Your app will be automatically deployed to Zephyr Cloud
Requirements
- Parcel 2.x or higher
- Node.js 14 or higher
- Zephyr Cloud account (sign up at zephyr-cloud.io)
Contributing
We welcome contributions! Please read our contributing guidelines for more information.
License
Licensed under the Apache-2.0 License. See LICENSE for more information.
