Add support for nested node projects
This commit is contained in:
parent
4a0ebe2845
commit
9817172d65
@ -1,5 +1,7 @@
|
|||||||
FROM node:14-alpine3.10
|
FROM node:14-alpine3.10
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json .
|
COPY package.json .
|
||||||
RUN npm install --quiet
|
COPY ./modules ./modules
|
||||||
|
COPY full-install.sh .
|
||||||
|
RUN npm run full-install
|
||||||
COPY . .
|
COPY . .
|
||||||
|
@ -7,5 +7,3 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
- /app/node_modules
|
- /app/node_modules
|
||||||
- /app/modules
|
|
||||||
- ./modules:/modules
|
|
||||||
|
11
full-install.sh
Executable file
11
full-install.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
npm install
|
||||||
|
|
||||||
|
echo "Installing dependencies of modules"
|
||||||
|
for d in modules/* ; do
|
||||||
|
if test -f "$d/package.json"; then
|
||||||
|
echo "$d is a node module, installing dependencies"
|
||||||
|
( cd $d && npm install )
|
||||||
|
else
|
||||||
|
echo "$d does not appear to be a node module, skipping"
|
||||||
|
fi
|
||||||
|
done
|
@ -4,6 +4,7 @@
|
|||||||
"description": "Modular discord bot mainly intended for moderation usage",
|
"description": "Modular discord bot mainly intended for moderation usage",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"full-install": "sh full-install.sh",
|
||||||
"dev": "nodemon index.js"
|
"dev": "nodemon index.js"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
Loading…
Reference in New Issue
Block a user