Skip to content

How to publish

Carlo Beltrame edited this page Mar 19, 2022 · 1 revision

Run linter

npm run lint

Run tests

npm run test

Publish to npm

npx np

Publish to npm without having npm installed (using Docker)

Note: This does not work as easily on Mac, because the SSH agent socket cannot be forwarded there.

# Only necessary the first time (copy user name and email to repo-specific git config):
git config user.name "$(git config user.name)" && git config user.email "$(git config user.email)"

# For publishing a new version:
git pull  # make sure the SSH private key is unlocked
docker run -it --rm -v $(pwd):/app -w /app -v ~/.ssh:/root/.ssh:ro -v $SSH_AUTH_SOCK:/ssh-agent -e SSH_AUTH_SOCK=/ssh-agent --network host node bash
npm login # use account ecamp and a spam email address which you control
npm i
npm run build
npm i -g np
np # or use np --any-branch if you are publishing from another than the main branch
Clone this wiki locally