install dependencies
cd lib/
yarn
build project
cd lib/
yarn build
project init
npm init -y
npm install typescript
npx tsc --init
cd test/
yarn add @bhawick/hiorder
// index.ts
import {reduce} from "@bhawick/hiorder/dist";
console.log(reduce([1, 2, 3], (a: number, b: number) => a+b, 0))
link local package to a test project
cd lib/
yarn link
build package with latest changes
yarn build
add linked package to test project
cd test/
yarn link @bhawick/hiorder
yarn add @bhawick/hiorder
add typescript compiler
cd test/
yarn add --dev ts-node
// index.ts
import {reduce} from "@bhawick/hiorder/dist";
console.log(reduce([1, 2, 3], (a: number, b: number) => a+b, 0))
run index.ts
npx ts-node index.ts //=> 6
increment version increment version in package.json and add version git tag. Only use when ready to release. This will update the project.json, and add a git tag. Once done, the commit will be associate to that tag, so make sure this the commit you want to release! For more information see yarn docs.
yarn version --major
yarn version --minor
yarn version --patch
push git version tag and trigger deployment
git push --tags