<script src="https://unpkg.com/@requestly/web-sdk@latest/dist/requestly-web-sdk.min.js" crossorigin></script>This would expose Requestly as a global variable.
npm install @requestly/web-sdk --save yarn add @requestly/web-sdkImport in project as ES module:
import * as Requestly from '@requestly/web-sdk';Check documentation for different modules exposed by SDK.
The repo's .npmrc sets ignore-scripts=true, so npm lifecycle scripts do not run automatically.
- Git hooks:
npm cino longer installs the husky pre-commit hook. Runnpm run prepareonce after cloning. - Releasing:
npm versionno longer runs theversion(build) andpostversion(push) scripts. Release with:
# Each step runs only if the previous one succeeded. Start from a clean working tree: the first step
# stops the release if anything is staged, modified or untracked, so the tag contains exactly what was built.
# The version is bumped first (the build embeds it); the release commit and tag are created only after
# the build succeeds.
test -z "$(git status --porcelain)" && \
npm ci && \
npm version <patch|minor|major> --no-git-tag-version && \
npm run build && \
VERSION=$(node -p "require('./package.json').version") && \
git commit -am "$VERSION" && \
git tag -a "v$VERSION" -m "$VERSION" && \
git push && git push origin "v$VERSION" && \
npm publishIf the build fails, nothing is committed or tagged; fix the build after discarding the bump with
git checkout package.json package-lock.json, then run the release again. Because the release only starts from
a clean tree, this discards nothing but the version bump.