diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index e44e52c..6e9cd3e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -8,7 +8,6 @@ RUN apt update && export DEBIAN_FRONTEND=noninteractive \ && rm -rf /var/lib/apt/lists/* RUN git lfs install -RUN npm install -g lerna ENV ZSH_CUSTOM /root/.oh-my-zsh/ RUN git clone https://github.com/reobin/typewritten.git $ZSH_CUSTOM/themes/typewritten diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 75f69a1..940af91 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -23,6 +23,7 @@ "ms-vscode.vscode-typescript-tslint-plugin" ], "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached", + "workspaceFolder": "/workspace", "mounts": [ "source=decla-red-root-node_modules,target=/workspace/node_modules,type=volume", "source=decla-red-frontend-node_modules,target=/workspace/frontend/node_modules,type=volume", @@ -33,8 +34,5 @@ 3000, 8080 ], - // Use 'postCreateCommand' to run commands after the container is created. - //"postCreateCommand": "yarn install", - // Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. - //"remoteUser": "node" + "postCreateCommand": "npm install && npx lerna run initialize", } \ No newline at end of file diff --git a/backend/package.json b/backend/package.json index 7d5cbc3..3789a5e 100644 --- a/backend/package.json +++ b/backend/package.json @@ -6,7 +6,8 @@ "scripts": { "start": "concurrently --kill-others \"webpack --mode development -w\" \"nodemon --legacy-watch dist/main.js\"", "lint": "eslint --fix \"src/**/*.ts\" && prettier --write \"src/**/*.ts\"", - "build": "webpack --mode production" + "build": "webpack --mode production", + "initialize": "npm install" }, "keywords": [], "author": "András Schmelczer (https://schmelczer.dev/)", diff --git a/frontend/package.json b/frontend/package.json index 78820ab..2d37f2c 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -5,8 +5,9 @@ "main": "index.js", "scripts": { "start": "webpack-dev-server --mode development", - "lint": "npx eslint --fix \"src/**/*.ts\" && npx prettier --write \"src/**/*.ts\"", - "build": "webpack --mode production && find dist -type f -not -name '*.html' | xargs rm" + "lint": "eslint --fix \"src/**/*.ts\" && prettier --write \"src/**/*.ts\"", + "build": "webpack --mode production && find dist -type f -not -name '*.html' | xargs rm", + "initialize": "npm install" }, "keywords": [], "author": "András Schmelczer (https://schmelczer.dev/)", diff --git a/package.json b/package.json index b904c1c..a5de943 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,8 @@ "name": "root", "private": true, "scripts": { - "start": "lerna run --parallel start" + "start": "lerna run --parallel start", + "initialize": "lerna run initialize" }, "devDependencies": { "@types/cors": "^2.8.7", diff --git a/shared/package.json b/shared/package.json index af908e4..8e255dc 100644 --- a/shared/package.json +++ b/shared/package.json @@ -4,6 +4,7 @@ "description": "Shared library between backend and frontend", "main": "src/main.ts", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "initialize": "npm install" } -} \ No newline at end of file +}