Skip to content

Commit

Permalink
fix launch
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Jun 10, 2024
1 parent ea2a05a commit a28b19a
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"source=./codeforlife-package-python,target=/workspace/codeforlife-package-python,type=bind,consistency=cached"
],
"name": "portal-frontend",
"postCreateCommand": "sudo chmod u+x ./setup && ./setup",
"postCreateCommand": "sudo chmod u+x scripts/setup && scripts/setup",
"remoteUser": "root",
"service": "base-service",
"shutdownAction": "none",
Expand Down
2 changes: 1 addition & 1 deletion .gcloudignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/codecov.yml
/*.code-*
/*.md
/setup
/scripts
/tsconfig.json
/tsconfig.node.json
/vite.config.ts
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"configurations": [
{
"name": "React Dev Server",
"preLaunchTask": "start-react-dev-server",
"name": "Vite Server",
"preLaunchTask": "start-vite-server",
"request": "launch",
"type": "chrome",
"url": "http://localhost:5173"
Expand Down
12 changes: 9 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
{
"tasks": [
{
"command": "sudo chmod u+x scripts/setup && scripts/setup && yarn dev",
"isBackground": true,
"label": "start-react-dev-server",
"label": "start-vite-server",
"options": {
"env": {
"BROWSER": "none"
}
},
"problemMatcher": [],
"script": "start",
"type": "npm"
"type": "shell"
},
{
"command": "sudo chmod u+x scripts/hard-install && scripts/hard-install",
"label": "hard-install",
"problemMatcher": [],
"type": "shell"
}
],
"version": "2.0.0"
Expand Down
8 changes: 8 additions & 0 deletions scripts/hard-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e

cd "${BASH_SOURCE%/*}"

rm -f ../yarn.lock
rm -rf ../node_modules
yarn install --production=false
2 changes: 0 additions & 2 deletions setup → scripts/setup
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ set -e

cd "${BASH_SOURCE%/*}"

printf "Setting up Node.js environment\n\n"

yarn install --production=false

0 comments on commit a28b19a

Please sign in to comment.