Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: added nvmrc #582

Merged
merged 5 commits into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
coverage
lib
*.DS_Store
.nvmrc
14 changes: 10 additions & 4 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Development

These are some of the development guidelines and help to setup the library for development.

## Docker

A [Dockerfile](../Dockerfile) is provided and can be used for running test suites or any other command.
You can either build the image and run the needed commands manually or rather use any of the following npm scripts:

Expand All @@ -12,10 +14,14 @@ You can either build the image and run the needed commands manually or rather us
## Environment setup

To setup the environment follow these steps:

1. Setup the project by first installing the dependencies `npm install`
2. Make sure the tests pass by running `npm run test` script
- You can update snapshots by running `npm run test -- -u`
3. Make sure code is well formatted and secure `npm run lint`
2. Run `npm run nvmrc` to setup nvm.
3. Run `nvm use` to update the nodejs version.
4. Make sure the tests pass by running `npm run test` script
- You can update snapshots by running `npm run test -- -u`
5. Make sure code is well formatted and secure `npm run lint`

## BlackBox testing
We have several BlackBox tests that are run separately from the `npm run test` script. Please refer to the [BlackBox documentation](../test/blackbox) for further information.

We have several BlackBox tests that are run separately from the `npm run test` script. Please refer to the [BlackBox documentation](../test/blackbox) for further information.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
},
"scripts": {
"build": "tsc",
"nvmrc": "echo $(node -p -e 'require(\"./package\").engines.node.split(\">=\").join(\"\")') > .nvmrc",
"build:prod": "npm run build:cjs && npm run build:esm && npm run build:types",
"build:cjs": "tsc",
"build:esm": "tsc --project tsconfig.json --module ESNext --outDir ./lib/esm",
Expand Down