@mdn/rari
v0.2.27
Published
npm package for rari
Readme
rari on npm
[!WARNING] This is still experimental and work in progress.
This exposes rari in the npm world.
Local development
Building types from local Rust changes
From the repo root, build the binary and copy it into the npm package:
cargo build
cp target/debug/rari rari-npm/bin/rariThen from rari-npm/, export the schema and regenerate the types:
npm run export-schema # writes schema.json using the local binary
npm run generate-types # generates lib/rari-types.d.ts from schema.jsonCreating a test package
After generating types, create a tarball from rari-npm/:
npm packThis produces mdn-rari-<version>.tgz. To install it in another project:
npm install /path/to/rari/rari-npm/mdn-rari-*.tgzThe postinstall script will download the released binary matching the package version from GitHub. To use the locally-built binary instead, skip postinstall and copy the binary manually:
npm install --ignore-scripts /path/to/rari/rari-npm/mdn-rari-*.tgz
mkdir -p node_modules/@mdn/rari/bin
cp /path/to/rari/target/debug/rari node_modules/@mdn/rari/bin/rari