jmapcloud-console-js
v0.3.20
Published
Jmap Cloud Console
Keywords
Readme
The first time, install dependencies :
npm iTo start the application :
npm startThe application is accessible at this location : http://localhost:8087
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 :
- "TSLint (deprecated)" extention
- "Prettier - Code formatter" extention (Author : Esben Petersen)
- "vscode-styled-components" extention (Author : Julien Poissonier)Configure vscode
- Create or edit app/.vscode/settings.json
- Add the following content :
{
"tslint.autoFixOnSave": true,
"tslint.enable": true,
"tslint.configFile": "./build/tslint.json",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.detectIndentation": false
}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):
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_useFor bash (~/.bashrc):
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_useReload your shell after updating config:
source ~/.zshrc
source ~/.bashrc