Install yarn with homebrew
brew install yarn
Install all dependencies in a project
yarn
Recommended VS Code plugins:
- Prettier
Use node >= 10 or install nvm and run
nvm use
Install following plugins for VsCode:
- Prettier
- TSLint
- EditorConfig
- vsc-nvm
There are 2 types of packages: libraries and apps (services). An app can depend on one or more library, but not on another app. A library can depend on another library, but not on an app.
Project uses yarn workspaces. It allows for the following workflow: Each folder is an isolated npm package with its own dependencies Each package must implement the following commands: lint build watch test clean
if package is an app it must also include start stop deploy destroy
yarn wsrun <command-name> // runs yarn <command-name> in each package
or
yarn workspace <package-name> <script-name>
yarn wsrun -p <package-name> -c <script-name>
or
yarn workspace <package-name> <script-name>
yarn wsrun -p <package-name> -r <script-name>
yarn wsrun -p assessor-app -r watch // watches any changes in workspace and its dependencies and rebuilds
yarn workspace <package-name> add <dependency-name> // add --dev if dev dependency
yarn workspace <package-name> remove <dependency-name>
yarn workspaces info
More info on (yarn workspace)[https://yarnpkg.com/lang/en/docs/cli/workspace/] More info on (yarn workspaces)[https://yarnpkg.com/en/docs/cli/workspaces] More info on (wsrun)[https://github.com/hfour/wsrun]