0.7.0 • Published 11 months ago
rngo v0.7.0
rngo for Node.js
The official Node.js library for rngo and a bundled CLI.
Installation
To add the library to your Node.js project, run:
npm install rngoor
yarn add rngoUsage
Start by initializing an instance of the Rngo class:
import { Rngo } from 'rngo';
const rngo = Rngo.init();This expects the rngo API token to be available in the RNGO_API_TOKEN environment variable, and will use default configuration values.
You can also pass in a configuration object:
const rngo = Rngo.init({
apiToken: env.API_TOKEN,
directory: 'rngo-data',
})You can use the Rngo instance to run simulations:
const simulation = await rngo.runSimulation()and import simulation data:
await rngo.importSimulation(simulation.id)CLI
The CLI can be used locally in a project by running:
npx rngoor
yarn rngoTo install the CLI globaly, run:
npm install -g rngoor
yarn global add rngoFor usage details, run:
rngo --helpContributing
Release
To release, run:
npm version <major|minor|patch>
git push
git push --tagsCreate the Github release for that tag, and run:
npm publish