-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(internal): codegen related update (#115)
- Loading branch information
1 parent
933a4e9
commit 335f682
Showing
2 changed files
with
27 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,9 @@ Other package managers may work but are not officially supported for development | |
|
||
To set up the repository, run: | ||
|
||
```bash | ||
yarn | ||
yarn build | ||
```sh | ||
$ yarn | ||
$ yarn build | ||
``` | ||
|
||
This will install all the required dependencies and build output files to `dist/`. | ||
|
@@ -22,7 +22,7 @@ modify the contents of the `src/lib/` and `examples/` directories. | |
|
||
All files in the `examples/` directory are not modified by the generator and can be freely edited or added to. | ||
|
||
```bash | ||
```ts | ||
// add an example to examples/<your-example>.ts | ||
|
||
#!/usr/bin/env -S npm run tsn -T | ||
|
@@ -41,38 +41,38 @@ If you’d like to use the repository from source, you can either install from g | |
|
||
To install via git: | ||
|
||
```bash | ||
npm install git+ssh://[email protected]:Metronome-Industries/metronome-node.git | ||
```sh | ||
$ npm install git+ssh://[email protected]:Metronome-Industries/metronome-node.git | ||
``` | ||
|
||
Alternatively, to link a local copy of the repo: | ||
|
||
```bash | ||
```sh | ||
# Clone | ||
git clone https://www.github.com/Metronome-Industries/metronome-node | ||
cd metronome-node | ||
$ git clone https://www.github.com/Metronome-Industries/metronome-node | ||
$ cd metronome-node | ||
|
||
# With yarn | ||
yarn link | ||
cd ../my-package | ||
yarn link @metronome/sdk | ||
$ yarn link | ||
$ cd ../my-package | ||
$ yarn link @metronome/sdk | ||
|
||
# With pnpm | ||
pnpm link --global | ||
cd ../my-package | ||
pnpm link -—global @metronome/sdk | ||
$ pnpm link --global | ||
$ cd ../my-package | ||
$ pnpm link -—global @metronome/sdk | ||
``` | ||
|
||
## Running tests | ||
|
||
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. | ||
|
||
```bash | ||
npx prism mock path/to/your/openapi.yml | ||
```sh | ||
$ npx prism mock path/to/your/openapi.yml | ||
``` | ||
|
||
```bash | ||
yarn run test | ||
```sh | ||
$ yarn run test | ||
``` | ||
|
||
## Linting and formatting | ||
|
@@ -82,14 +82,14 @@ This repository uses [prettier](https://www.npmjs.com/package/prettier) and | |
|
||
To lint: | ||
|
||
```bash | ||
yarn lint | ||
```sh | ||
$ yarn lint | ||
``` | ||
|
||
To format and fix all lint issues automatically: | ||
|
||
```bash | ||
yarn fix | ||
```sh | ||
$ yarn fix | ||
``` | ||
|
||
## Publishing and releases | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters