jmapserver-ng-core 2.11.1 → 2.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/readme.md CHANGED
@@ -22,3 +22,74 @@ When code is changed, it's automatically built and the web page refresh by its o
22
22
 
23
23
  - https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
24
24
  - "Prettier - Code formatter" extention (Author : Esben Petersen)
25
+
26
+
27
+ #### Node version (nvm)
28
+
29
+ This repository uses Node.js version defined in `.nvmrc` (`18`).
30
+
31
+ Use `nvm` to switch automatically when changing directory and log the switch in terminal.
32
+
33
+ For `zsh` (`~/.zshrc`):
34
+
35
+ ```zsh
36
+ export NVM_DIR="$HOME/.nvm"
37
+ [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
38
+
39
+ nvm_auto_use() {
40
+ local nvmrc_path target current
41
+ nvmrc_path="$(nvm_find_nvmrc)"
42
+ [ -z "$nvmrc_path" ] && return
43
+
44
+ target="$(cat "$nvmrc_path")"
45
+ current="$(nvm current)"
46
+
47
+ if [ "$(nvm version "$target")" != "$current" ]; then
48
+ echo "[nvm] switching to $target for $(dirname "$nvmrc_path")"
49
+ nvm use "$target" || nvm install "$target"
50
+ fi
51
+ }
52
+
53
+ autoload -U add-zsh-hook
54
+ add-zsh-hook chpwd nvm_auto_use
55
+ nvm_auto_use
56
+ ```
57
+
58
+ For `bash` (`~/.bashrc`):
59
+
60
+ ```bash
61
+ export NVM_DIR="$HOME/.nvm"
62
+ [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
63
+
64
+ nvm_auto_use() {
65
+ local nvmrc_path target current
66
+ nvmrc_path="$(nvm_find_nvmrc)"
67
+ [ -z "$nvmrc_path" ] && return
68
+
69
+ target="$(cat "$nvmrc_path")"
70
+ current="$(nvm current)"
71
+
72
+ if [ "$(nvm version "$target")" != "$current" ]; then
73
+ echo "[nvm] switching to $target for $(dirname "$nvmrc_path")"
74
+ nvm use "$target" || nvm install "$target"
75
+ fi
76
+ }
77
+
78
+ __NVM_AUTO_LAST_PWD=""
79
+ nvm_auto_use_prompt_hook() {
80
+ if [ "$PWD" != "$__NVM_AUTO_LAST_PWD" ]; then
81
+ __NVM_AUTO_LAST_PWD="$PWD"
82
+ nvm_auto_use
83
+ fi
84
+ }
85
+ PROMPT_COMMAND="nvm_auto_use_prompt_hook${PROMPT_COMMAND:+; $PROMPT_COMMAND}"
86
+
87
+ nvm_auto_use
88
+ ```
89
+
90
+ Reload your shell after updating config:
91
+
92
+ ```bash
93
+ source ~/.zshrc
94
+ source ~/.bashrc
95
+ ```