swq-data-contracts
v0.0.9
Published
Shell Welcome Quote :: Data Contracts
Downloads
1
Readme
Shell Welcome Quote :: Data Contracts
Data Contracts - is set of interfaces to be used on both sides API & UI.
Usage
npm i swq-data-contracts
# or
yarn add swq-data-contracts
Development guide
Technical Features
- Wallaby JS works out of the box without any additional config
Notice: How to run in "Without Configuration" mode (Official Wallaby JS Guide) - ESLint for linting JS & TS files (TSLint is deprecated in 2019). Basic rules configured.
- Very strict linting config (airbnb + unicorn + some other plugins)
- Unit Testing via Jest 24+
- Additional Jest matchers from
jest-extended
configured - TypeScript 3.7+ via Babel
- Yarn for packages installation and
check-yarn
utility to prevent packages installation vianpm
.nvmrc
- Nothing platform related. This repository template can be used for NodeJS and for Browser development.
- Git hooks via husky
- Utility to automatically pull updates from the template repository (
npm run tpl-repo:merge
)
Cloning project
git clone [email protected]:Shell-Welcome-Quote/swq-data-contracts.git
cd swq-data-contracts
yarn
How to use NodeJS version from the .nvmrc
Install NVM
Use
.nvmrc
file one of the next ways:- Execute
nvm use
in the project root directory - Install NVM Loader and your .nvmrc will be loaded automatically when you open the terminal.
- Execute
How to make a build
npm run build
How to run lint
- Just show problems
npm run lint
- Fix problems if it is possible
npm run lint:fix
How to run tests
All tests
npm run test
npm run test:watch
Specific tests
npm run test -- src/my.spec.ts
npm run test:watch -- src/my.spec.ts
How to build and publish NPM package
CI configuration details here: .github/workflows/npmpublish.yml
npm run pre-push
&& npm version patch -m 'Update package version version to %s'
&& npm run gen-public-package.json
&& cp README.md dist/
&& npm publish dist --access public
&& git push --no-verify && git push --tags --no-verify
Author
| Anton Korniychuk | | :---: |