Commit 65b01c8ae9fe5b00cee3454999348cd50f1cae0a
1 parent
7bdd0173
添加node默认配置
Signed-off-by: TanYibin <5491541@qq.com>
Showing
4 changed files
with
63 additions
and
1 deletions
ant-design-vue-jeecg/.gitignore
ant-design-vue-jeecg/node/node.exe
0 → 100644
No preview for this file type
ant-design-vue-jeecg/node/npm
0 → 100644
1 | +#!/usr/bin/env bash | |
2 | +(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix | |
3 | + | |
4 | +basedir=`dirname "$0"` | |
5 | + | |
6 | +case `uname` in | |
7 | + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; | |
8 | +esac | |
9 | + | |
10 | +NODE_EXE="$basedir/node.exe" | |
11 | +if ! [ -x "$NODE_EXE" ]; then | |
12 | + NODE_EXE="$basedir/node" | |
13 | +fi | |
14 | +if ! [ -x "$NODE_EXE" ]; then | |
15 | + NODE_EXE=node | |
16 | +fi | |
17 | + | |
18 | +# this path is passed to node.exe, so it needs to match whatever | |
19 | +# kind of paths Node.js thinks it's using, typically win32 paths. | |
20 | +CLI_BASEDIR="$("$NODE_EXE" -p 'require("path").dirname(process.execPath)')" | |
21 | +NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js" | |
22 | + | |
23 | +NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` | |
24 | +if [ $? -ne 0 ]; then | |
25 | + # if this didn't work, then everything else below will fail | |
26 | + echo "Could not determine Node.js install directory" >&2 | |
27 | + exit 1 | |
28 | +fi | |
29 | +NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" | |
30 | + | |
31 | +# a path that will fail -f test on any posix bash | |
32 | +NPM_WSL_PATH="/.." | |
33 | + | |
34 | +# WSL can run Windows binaries, so we have to give it the win32 path | |
35 | +# however, WSL bash tests against posix paths, so we need to construct that | |
36 | +# to know if npm is installed globally. | |
37 | +if [ `uname` = 'Linux' ] && type wslpath &>/dev/null ; then | |
38 | + NPM_WSL_PATH=`wslpath "$NPM_PREFIX_NPM_CLI_JS"` | |
39 | +fi | |
40 | +if [ -f "$NPM_PREFIX_NPM_CLI_JS" ] || [ -f "$NPM_WSL_PATH" ]; then | |
41 | + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" | |
42 | +fi | |
43 | + | |
44 | +"$NODE_EXE" "$NPM_CLI_JS" "$@" | |
... | ... |
ant-design-vue-jeecg/node/npm.cmd
0 → 100644
1 | +:: Created by npm, please don't edit manually. | |
2 | +@ECHO OFF | |
3 | + | |
4 | +SETLOCAL | |
5 | + | |
6 | +SET "NODE_EXE=%~dp0\node.exe" | |
7 | +IF NOT EXIST "%NODE_EXE%" ( | |
8 | + SET "NODE_EXE=node" | |
9 | +) | |
10 | + | |
11 | +SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" | |
12 | +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( | |
13 | + SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" | |
14 | +) | |
15 | +IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( | |
16 | + SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" | |
17 | +) | |
18 | + | |
19 | +"%NODE_EXE%" "%NPM_CLI_JS%" %* | |
... | ... |