The below document outlines steps to develop and deploy the hCaptcha loader library.
- NodeJS v18.16+
- PNPM v8.0+
1.Install packages by running pnpm install
2.In separate tabs, running the following:
pnpm run dev:lib
pnpm run display:demo
pnpm run build:lib
: Builds distributed versionpnpm run dev:lib
: Creates watcher that rebuilds library when a change occurspnpm run display:demo
: Starts server and opens demo pagepnpm run fix:lint
: Fixes lint issues that are automatically solvablepnpm run test:lint
: Runs lint checkingpnpm run test:type
: Runs type checkingpnpm run test:unit
: Runs unit tests in @loader/libpnpm run test:integration
: Runs integrations tests with playwright
To publish a new version, follow the next steps:
- Bump the version in package.json
- Create Pull Request for approval
- Merge to main branch
- Create a Github Release with version number specified in package.json
- Workflow will be triggered, deploying code to npm @hcaptcha/loader.