Add support for nested node projects
This commit is contained in:
parent
4a0ebe2845
commit
9817172d65
@ -1,5 +1,7 @@
|
||||
FROM node:14-alpine3.10
|
||||
WORKDIR /app
|
||||
COPY package.json .
|
||||
RUN npm install --quiet
|
||||
COPY ./modules ./modules
|
||||
COPY full-install.sh .
|
||||
RUN npm run full-install
|
||||
COPY . .
|
||||
|
@ -7,5 +7,3 @@ services:
|
||||
volumes:
|
||||
- .:/app
|
||||
- /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",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"full-install": "sh full-install.sh",
|
||||
"dev": "nodemon index.js"
|
||||
},
|
||||
"keywords": [
|
||||
|
Loading…
Reference in New Issue
Block a user