pnpm install
pnpm build
pnpm link --global
crossmint --help
To automatically rebuild and relink on changes:
pnpm dev
pnpm unlink --global
pnpm link --global
Then, verify it’s linked:
pnpm bin -g
ls -l $(pnpm bin -g)
pnpm config set global-bin-dir ~/.local/bin
Then, add it to your PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Then, relink the CLI:
pnpm unlink --global
pnpm link --global
For releasing you will need to modify the package.json version. You can do this by running
pnpm version <patch|minor|major>
Then you'll have to commit the package change and include it in your PR.
First build the js dist for pkg
pnpm build:pkg
Notice that this will break the pnpm linked bin, you can fix it by running later pnpm build
.
Then run to create the binary:
pnpm exec pkg dist/bin/crossmint.js --targets node20-macos-arm64 --output build/cli
Then try the package by running:
./build/cli help