Jitsu JavaScript SDK (jitsu.js)
Jitsu.js is a JavaScript SDK for Jitsu. Please, see main Jitsu JavaScript integration docs on the website.
Questions?
Join Jitsu Slack
Links
Maintainers Guide
This section is indented only for package maintainers.
Building and local debug
-
ATTENTION: Use
yarn
for everything except publishing - To spin off a local development server run
yarn devserver
, then open http://localhost:8081- The server listens to all changes to src and rebuilds npm and
lib.js
automatically. Open test cases HTML files to see jitsu in action- http://localhost:8081/test-case/embed.html - embedded Jitsu
- http://localhost:8081/test-case/embed-no-init.html - Jitsu without automatic initialization
- http://localhost:8081/test-case/segment-intercept.html - test segment interception
- The server listens to all changes to src and rebuilds npm and
-
yarn test
runs Playwright test -
yarn build
builds both npm package andlib.js
browser bundle -
npm publish --public
to publish the package (change version inpackage.json
manually). You need to runnpm login
with your personal npmjs account beforehand (make sure you have access to Jitsu team)
Publishing new version
- Login with your personal credentials with
npm login
- Run
yarn install && yarn build && yarn test && npm publish --access public