Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
siranweb committed Aug 9, 2024
1 parent d6259a2 commit 9ded8ae
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
17 changes: 17 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Development

## Update schema
1. Run `npm run update:schema` to generate schema and format it

## Building
1. Run `rm -rf dist` to remove `dist` directory (if exists).
2. Run `npm run pre-build` to run TS check, linter and formatter.
3. Run `npm run build` to build.

To use this local package, install it with `npm i path/to/this/dir`.

## Publishing
1. Update version in `package.json` and `package-lock.json`.
Alternatively, use `npm version {VERSION}` to make version commit.
2. Run `npm run publish --dry-run` to check before publishing.
3. Run `npm run publish` to publish package.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,6 @@ function getMaps(params: GetAllMapsApiQuery): Promise<GetAllMapsApiResult> {
return artifactsApi.maps.getAll(params);
};
```

## Develop
Refer to [DEVELOPMENT.md](./DEVELOPMENT.md).
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
],
"scripts": {
"build": "tsc",
"pre-build": "npm run ts-check && npm run lint && npm run format",
"ts-check": "tsc --noEmit",
"lint": "eslint --max-warnings 0 --ext .ts lib",
"format": "prettier --log-level warn --write lib",
"generate-schema": "openapi-typescript https://api.artifactsmmo.com/openapi.json -o lib/api/types/api-schema.types.ts"
"update:schema": "npm run generate:schema && npm run format:schema",
"format:schema": "prettier --log-level warn --write lib/api/types/api-schema.types.ts",
"generate:schema": "openapi-typescript https://api.artifactsmmo.com/openapi.json -o lib/api/types/api-schema.types.ts"
},
"author": "Kirill Gerasimenko <[email protected]>",
"license": "MIT",
Expand Down

0 comments on commit 9ded8ae

Please sign in to comment.