A Clarity development environment Yeoman generator.
Generates a TypeScript project that contains a hello-world.clar
sample smart contract and
a minimal Mocha test suite using the Clarity SDK.
mkdir hello-clarity
cd hello-clarity
npm init yo clarity-dev
npm test
Expected output:
hello world contract test suite
✓ should have a valid syntax
deploying an instance of the contract
✓ should return 'hello world'
✓ should echo number
3 passing
-
Ensure all checks pass when running
npx yo doctor
.Yeoman Doctor - Running sanity checks on your system ✔ Global configuration file is valid ✔ NODE_PATH matches the npm root ✔ Node.js version ✔ No .bowerrc file in home directory ✔ No .yo-rc.json file in home directory ✔ npm version ✔ yo version
-
Alternate install commands
The above
npm init ...
command uses thecreate-yo
utility to avoid global package installs. If running into problems then try with regularyo
installation:npm install -g yo generator-clarity-dev yo clarity-dev
If seeing error messages related to the clarity-native-bin package then see its README for more details.