Skip to content

Latest commit

 

History

History
89 lines (71 loc) · 1.6 KB

CONTRIBUTING.md

File metadata and controls

89 lines (71 loc) · 1.6 KB

Contributing

steps to build this package

install dependencies

cd lib/
yarn

build project

cd lib/
yarn build

create a test project to use local package build

project init

npm init -y
npm install typescript
npx tsc --init

import published build and run sample

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))

import and run the local package build

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

steps for incrementing package versions and publishing

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