npm usage
Shows how to depend on @tishlang/tish from the npm registry and run or compile Tish from npm scripts (uses node_modules/.bin/tish).
Prerequisites
- Node.js 22+
- npm (or another client that respects
package.jsonscriptsanddependencies)
Setup
From this directory:
npm installThis installs @tishlang/tish, which provides the tish CLI for your platform.
Run (interpreter)
npm start
# same as: npx tish run src/main.tishOr without a prior install:
npx @tishlang/tish run src/main.tishCompile to native
npm run compile
./appOn Windows, run app.exe instead of ./app.
REPL
npm run replVersion pin
package.json uses "@tishlang/tish": "^1.0.0" so installs get compatible 1.x releases (e.g. 1.0.7). Adjust the range if you need a specific version.
Developing inside the Tish repo
Examples in this repo are usually run with a cargo-built tish. This example is meant for published npm usage. To try it locally against your workspace package instead of the registry, you can use npm link from npm/tish or a file: dependency — that is optional and not required for end users.