CLI tool for staging whateverpack bundler with custom dependencies
npm install @thewhateverapp/whateverpack-cliCLI tool for staging whateverpack bundler with custom dependencies tied to the main repo's git hash.
``bashGlobal installation
npm install -g @thewhateverapp/whateverpack-cli
Usage
$3
Build and upload whateverpack to R2 with current git hash:
`bash
From main repo root
whateverpack stageWith custom options
whateverpack stage --hash abc123 --production
whateverpack stage --dry-run
`Options:
-
-h, --hash - Override git hash (defaults to current commit)
- -p, --production - Upload to production path (default: staging)
- -m, --manifest-path - Path to .whateverpack.json (default: .whateverpack.json)
- -w, --whateverpack-path - Path to whateverpack repository
- -b, --bucket - R2 bucket name (default: static)
- -d, --dry-run - Perform a dry run without uploadingOutput:
`
Bundler URL: https://static.thewhatever.app/whateverpack/staging/{hash}/bundler/index.html
Manifest URL: https://static.thewhatever.app/whateverpack/staging/{hash}/manifest.json
`$3
Validate
.whateverpack.json manifest:`bash
whateverpack validate
whateverpack validate --manifest-path custom-manifest.json
`Manifest Format
Create a
.whateverpack.json file in your repo root:`json
{
"version": "1.0.0",
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"framer-motion": "^10.16.0",
"lucide-react": "^0.468.0",
"@thewhateverapp/tile-sdk": "latest",
"@thewhateverapp/platform": "latest"
},
"vendor": {
"core": {
"priority": 0,
"lazy": false,
"packages": ["react", "react-dom", "react-dom/client", "react/jsx-runtime"]
},
"sdk": {
"priority": 1,
"lazy": false,
"packages": ["@thewhateverapp/tile-sdk", "@thewhateverapp/platform"]
},
"ui": {
"priority": 2,
"lazy": true,
"packages": ["framer-motion", "lucide-react"]
}
}
}
`Fields:
-
version - Manifest version (optional, default: "1.0.0")
- dependencies - NPM packages and versions to bundle
- vendor - Vendor bundle groups (optional, will use defaults if not specified)Vendor Groups:
-
priority - Loading order (0 = first)
- lazy - Load on-demand (true) or eagerly (false)
- packages - List of package names to include in this groupEnvironment Variables
-
WHATEVERPACK_STATIC_BUCKET - R2 bucket name for uploads (default: static)
- WHATEVERPACK_BUNDLER_URL - Override bundler URL for testing
- WHATEVERPACK_MANIFEST_URL - Override manifest URL for testingWorkflow
1. Update dependencies in
.whateverpack.json
2. Stage the build: whateverpack stage
3. Test with tile-preview:
`bash
export WHATEVERPACK_BUNDLER_URL="https://static.thewhatever.app/whateverpack/staging/{hash}/bundler/index.html"
export WHATEVERPACK_MANIFEST_URL="https://static.thewhatever.app/whateverpack/staging/{hash}/manifest.json"
`
4. Promote to production: whateverpack stage --production`PROPRIETARY