forked from efcasado/grafana-plugin-splunk-datasource
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rc
30 lines (27 loc) · 1.27 KB
/
.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function npm() {
DOCKER_IMAGE=node
DOCKER_RUN_OPTS="--rm -v ${PWD}:${PWD} -w ${PWD} -e npm_config_cache=${PWD}/.npm -e npm_config_prefix=${PWD} -e YARN_CACHE_FOLDER=${PWD}/.cache/yarn -e GITHUB_TOKEN"
if [ -n "$ZSH_VERSION" ]; then
docker run ${=DOCKER_RUN_OPTS} --entrypoint=npm ${DOCKER_IMAGE} "$@"
else
docker run ${DOCKER_RUN_OPTS} --entrypoint=npm ${DOCKER_IMAGE} "$@"
fi
}
function npx() {
DOCKER_IMAGE=node
DOCKER_RUN_OPTS="--rm -v ${PWD}:${PWD} -w ${PWD} -e npm_config_cache=${PWD}/.npm -e npm_config_prefix=${PWD} -e YARN_CACHE_FOLDER=${PWD}/.cache/yarn -e GITHUB_TOKEN"
if [ -n "$ZSH_VERSION" ]; then
docker run ${=DOCKER_RUN_OPTS} --entrypoint=npx ${DOCKER_IMAGE} "$@"
else
docker run ${DOCKER_RUN_OPTS} --entrypoint=npx ${DOCKER_IMAGE} "$@"
fi
}
function yarn() {
DOCKER_IMAGE=node
DOCKER_RUN_OPTS="--rm -v ${PWD}:${PWD} -w ${PWD} -e NODE_OPTIONS=--openssl-legacy-provider -e npm_config_cache=${PWD}/.npm -e npm_config_prefix=${PWD}/.npm -e YARN_CACHE_FOLDER=${PWD}/.cache/yarn -e GITHUB_TOKEN"
if [ -n "$ZSH_VERSION" ]; then
docker run ${=DOCKER_RUN_OPTS} --entrypoint=yarn ${DOCKER_IMAGE} "$@"
else
docker run ${DOCKER_RUN_OPTS} --entrypoint=yarn ${DOCKER_IMAGE} "$@"
fi
}