Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Migrate to npm workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
domdomegg committed May 27, 2024
1 parent 714f2db commit ae67270
Show file tree
Hide file tree
Showing 11 changed files with 26,014 additions and 55,370 deletions.
1 change: 0 additions & 1 deletion .github/workflows/server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:

- name: "Install dependencies"
run: npm ci
working-directory: server
- name: "Lint"
run: npm run lint
working-directory: server
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:

- name: "Install dependencies"
run: npm ci
working-directory: web
- name: "Lint"
run: npm run lint --if-present
working-directory: web
Expand Down
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# dependencies
node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store

npm-debug.log*

# Serverless (and plugins) directories
.serverless
.webpack
.dynamodb

# Web custom environment
web/src/env/env.ts
web/src/env/local.ts
# local is .gitignored so custom changes aren't committed accidentally
# dev and prod configs can be public as they should not have secrets

# Server custom environment
server/src/env/env.ts
server/src/env/local.ts
server/src/env/dev.ts
server/src/env/prod.ts
25,959 changes: 25,959 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

{
"name": "postal-vote",
"workspaces": [
"server",
"web"
],
"private": true,
"scripts": {
"postinstall": "npm run postinstall --workspaces --if-present",
"start": "npm run start --workspaces --if-present",
"test": "npm run test --workspaces --if-present",
"lint": "npm run lint --workspaces --if-present",
"build": "npm run build --workspaces --if-present"
}
}

18 changes: 0 additions & 18 deletions server/.gitignore

This file was deleted.

26,481 changes: 0 additions & 26,481 deletions server/package-lock.json

This file was deleted.

5 changes: 3 additions & 2 deletions server/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@domdomegg/postal-vote-server",
"name": "server",
"private": true,
"main": "serverless.ts",
"scripts": {
"postinstall": "cp -n src/env/local.template.ts src/env/local.ts && cp -n src/env/local.ts src/env/env.ts",
"postinstall": "shx cp -n src/env/local.template.ts src/env/local.ts && shx cp -n src/env/local.ts src/env/env.ts",
"start": "npm run start:local",
"start:local": "cp src/env/local.ts src/env/env.ts && serverless offline start",
"deploy:dev": "cp src/env/dev.ts src/env/env.ts && serverless deploy --verbose",
Expand Down Expand Up @@ -47,6 +47,7 @@
"serverless-offline": "^12.0.3",
"serverless-offline-ses-v2": "^1.0.1",
"serverless-webpack": "^5.7.1",
"shx": "^0.3.4",
"ts-jest": "^27.0.7",
"ts-loader": "^9.2.6",
"ts-node": "^10.2.1",
Expand Down
19 changes: 0 additions & 19 deletions web/.gitignore

This file was deleted.

Loading

0 comments on commit ae67270

Please sign in to comment.