Commit Graph

10 Commits

Author SHA1 Message Date
Martin Fischer
7ce7625117
Merge pull request #804 from return42/minor-fix
[mod] lib_nvm.sh: minor improvements / no functional change
2022-01-24 17:58:16 +01:00
Markus Heiser
309147d86f [mod] introduce node.env.devtools function 2022-01-24 07:51:31 +01:00
Martin Fischer
cac0352986 [mod] remove .nvm_packages, add eslint to package.json 2022-01-23 08:00:39 +01:00
Markus Heiser
a163385474 [mod] lib_nvm.sh: minor improvements / no functional change
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-22 19:57:25 +01:00
Markus Heiser
5242a841a5 [mod] NVM: dev-tools pre-installed in NVM's node installation
The Node.js installation in the NVM environment can be used by IDEs and other
developer tasks.  The required developer packagaes are added to the file
./.nvm_packages and will be installed when Node.js is installed.  Initial we
start with:

- eslint

Having a dedicated developer enviroment, provided by nvm makes it easy to
integrate Node.js packages into various IDEs.  One example is shown in the
.dir-locals.el which is used by emacs.

[1] https://github.com/nvm-sh/nvm#default-global-packages-from-file-while-installing
[2] https://eslint.org

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-20 17:08:22 +01:00
Markus Heiser
69dd025da9 [mod] nvm.cmd ... : run command ... in NVM environment
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-20 15:40:18 +01:00
Markus Heiser
6b4cad768d [mod] NVM: pin Node.js to v16.13.0
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-20 15:19:17 +01:00
Markus Heiser
3e2f3900b8 [fix] nvm.install: add missing popd / node.env exit with error (254)
Issue::

    $ make clean node.env
    ...
    CLEAN     [NVM] drop .nvm/
    ...
    INFO:  install Node.js by NVM
    ...
    Now using node v16.13.0 (npm v8.1.0)
    ...
    INSTALL   searx/static/themes/oscar/package.json
    npm ERR! code ENOENT
    npm ERR! syscall open
        # Here now comes the issue, caused by the missing 'popd' ..
    npm ERR! path SearXNG/.nvm/searx/static/themes/oscar/package.json
    npm ERR! errno -2
    npm ERR! enoent ENOENT: no such file or directory, open 'SearXNG/.nvm/searx/static/themes/oscar/package.json'
    ERROR: node.env exit with error (254)
    make: *** [Makefile:99: node.env] Error 254

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-20 15:16:14 +01:00
Markus Heiser
48752815ed [fix] make nvm.clean - don't raise error when NVM is not installed
Issue was::

    $ LANG=C make nvm.clean
    INFO:  NVM is not installed
    make: *** [Makefile:99: nvm.clean] Error 42

Now::

    $ LANG=C make nvm.clean
    CLEAN     [NVM] not installed

BTW: change info_msg to build_msg

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-19 13:19:54 +01:00
Markus Heiser
dc1442a2d1 [mod] Tools to install and maintain NVM versions manager for Node.js
[1] https://github.com/nvm-sh/nvm

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-16 23:31:11 +01:00