- Remove the installed version from NPM:
[sudo] npm rm -g gh
- Fork the project and clone it locally:
git clone git@github.com:<your-username>/gh.git
- Go to the package folder and create a symlink:
[sudo] npm link
- Then you can run commands normally
gh ...
Following a commit format allows us to automatically publish new builds via continuous integration
- Practically commits will end up looking like this:
fix(pull-request): resolves bug where pull request doesn't close
This happened because we weren't passing the right data to Octokit
fix #123
-
If you are not familiar with this pattern, simply run
npm run commit
which will take you through a helpful interactive semantic commit process -
If you want more info on the commit process, we follow Angular's Commit Convention
- We use a variable called
options
throughought our code base which holds core variables like flags that we reuse - We also freeze it for immutability benefits so if you try to mutate it somewhere, it will yell at you
- If you need to modify it please use the immer pattern:
import { produce } from 'immer'
options = produce(options, draft => {
draft.list = true
})
Since this is a TypeScript project, we have to compile the code before running it.
First, if you haven't already done so, install dependencies and create a sym link:
npm install
[sudo] npm link
To run incrementally in watch mode:
npm run dev
To run once:
npm run build
- Copy and edit the content of Hello World example
- Add instructions in README
Please verify that your tests pass & minimum coverage levels are met when contributing code:
npm test
Run all testsnpm run test:watch
Run all tests in watch modenpm run test:coverage
Run all tests with coveragenpm run test pull-request
Run one test
- Even if you don't install these plugins, your commits will automatically be formatted
Prettier is an opinionated code formatter
TSlint is a pluggable linting utility for TypeScript