#### after initial checkout :

duplicate the `.npmrc.example` file, rename the copy to `.npmrc` and configure values inside that file.

#### The first time, install dependencies :

    npm i

#### To start the Core library :

    npm start

A dev example page is accessible at this location : http://localhost:8081

To access a different project : http://localhost:8081?ngProjectId=XXX

The JS entry file is accessible at this location : http://localhost:8081/build/index.js

When code is changed, it's automatically built and the web page refresh by its own (thanks webpack dev server).

#### Install the following vs-code extensions :

    - https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
    - "Prettier - Code formatter" extention (Author : Esben Petersen)


#### Node version (nvm)

This repository uses Node.js version defined in `.nvmrc` (`18`).

Use `nvm` to switch automatically when changing directory and log the switch in terminal.

For `zsh` (`~/.zshrc`):

```zsh
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"

nvm_auto_use() {
  local nvmrc_path target current
  nvmrc_path="$(nvm_find_nvmrc)"
  [ -z "$nvmrc_path" ] && return

  target="$(cat "$nvmrc_path")"
  current="$(nvm current)"

  if [ "$(nvm version "$target")" != "$current" ]; then
    echo "[nvm] switching to $target for $(dirname "$nvmrc_path")"
    nvm use "$target" || nvm install "$target"
  fi
}

autoload -U add-zsh-hook
add-zsh-hook chpwd nvm_auto_use
nvm_auto_use
```

For `bash` (`~/.bashrc`):

```bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"

nvm_auto_use() {
  local nvmrc_path target current
  nvmrc_path="$(nvm_find_nvmrc)"
  [ -z "$nvmrc_path" ] && return

  target="$(cat "$nvmrc_path")"
  current="$(nvm current)"

  if [ "$(nvm version "$target")" != "$current" ]; then
    echo "[nvm] switching to $target for $(dirname "$nvmrc_path")"
    nvm use "$target" || nvm install "$target"
  fi
}

__NVM_AUTO_LAST_PWD=""
nvm_auto_use_prompt_hook() {
  if [ "$PWD" != "$__NVM_AUTO_LAST_PWD" ]; then
    __NVM_AUTO_LAST_PWD="$PWD"
    nvm_auto_use
  fi
}
PROMPT_COMMAND="nvm_auto_use_prompt_hook${PROMPT_COMMAND:+; $PROMPT_COMMAND}"

nvm_auto_use
```

Reload your shell after updating config:

```bash
source ~/.zshrc
source ~/.bashrc
```
