Contributing
Build, test and improve Stagepass. Issues and pull requests are welcome.
Get the code
Stagepass is open source under the MIT license. Issues and pull requests are welcome. The repository is a monorepo with npm workspaces for cli, loader and modules.
$ git clone https://github.com/arobertherz/stagepass.git
$ cd stagepass
$ npm install
$ npm run buildPrerequisites
- Node.js 18+
- npm (comes with Node.js)
- macOS only
- Homebrew (for dependency management)
Local development setup
1. Install Dependencies
Install all workspace dependencies from the root directory:
$ npm installThis downloads all packages for CLI and Loader and links the workspaces.
2. Make CLI Executable
Make the CLI binary executable:
$ chmod +x packages/cli/bin/index.js3. Link CLI Locally
Link the CLI package to simulate a global installation:
$ cd packages/cli
$ npm linkNote: This may require sudo depending on your Node.js installation, but usually it's not needed.
After linking, you can use stagepass commands from anywhere:
$ stagepass setup
$ stagepass start
$ stagepass link my-project4. Build Loader
Build the loader package:
$ cd packages/loader
$ npm run buildThis generates dist/loader.js and dist/loader.min.js.
For development with watch mode:
$ npm run devProject structure
stagepass/
├── packages/
│ ├── cli/ # CLI tool (published as @stagepass/cli)
│ │ ├── bin/ # Executable entry point
│ │ └── src/ # Source code
│ │ └── commands/
│ └── loader/ # Browser loader (published as @stagepass/loader)
│ ├── src/ # TypeScript source
│ └── dist/ # Built files (committed for CDN)
└── README.mdTesting changes
Prefer running the full test run in Docker (host node_modules may be macOS-native):
$ docker run --rm -v "$PWD":/w \
-v /w/node_modules -v /w/packages/cli/node_modules \
-v /w/packages/loader/node_modules -v /w/packages/modules/node_modules \
-w /w node:22-bookworm-slim bash -lc 'npm ci && npm run build && npm test --workspaces --if-present'Also verify on Node 20 (node:20-bookworm-slim) to match CI. Loader v2 behaviour notes: session expiry, version cache busting, and no global console mute. See MIGRATION.md.
CLI Changes
After modifying CLI code, the changes are immediately available if you used npm link. No rebuild needed.
Loader Changes
- Modify
packages/loader/src/index.ts - Run
npm run buildinpackages/loader/ - Test the built
dist/loader.min.jsin your Webflow project
For quick iteration, use watch mode:
$ cd packages/loader
$ npm run devUnlinking
To unlink the CLI after development:
$ npm unlink -g @stagepass/cliOr if you want to remove the global link:
$ cd packages/cli
$ npm unlinkGuidelines
- Open an issue first for larger changes, so we can agree on the approach.
- Keep features opt in and avoid breaking changes in minor versions.
- Add or update tests for what you change.
- Document changes in CHANGELOG.md.
Read the LICENSE and browse the open issues.