Skip to content

Commit

Permalink
fix(be): constants package
Browse files Browse the repository at this point in the history
  • Loading branch information
krystxf committed Nov 5, 2024
1 parent 38fee96 commit dcbfc07
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/backend-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ jobs:
cd apps/backend
pnpm prisma:generate
- name: Build dependencies
run: |
pnpm prebuild
- name: Build
run: |
cd apps/backend
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/web-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
run: |
pnpm install
- name: Build dependencies
run: |
pnpm prebuild
- name: Build
run: |
cd apps/web
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ FROM base AS build
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run -r --parallel build
RUN pnpm run build
RUN pnpm deploy --filter=@metro-now/web --prod /prod/web
RUN pnpm deploy --filter=@metro-now/backend --prod /prod/backend

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
"packageManager": "[email protected]",
"scripts": {
"xcode": "xed ./apps/mobile/metro-now",
"build": "pnpm --recursive --parallel run build",
"dev": "pnpm --recursive --parallel run dev",
"prebuild": "pnpm run -r --filter @metro-now/constants build",
"build": "pnpm --recursive --parallel run build",
"backend:build": "pnpm run -r --filter @metro-now/backend build",
"backend:dev": "pnpm run -r --filter @metro-now/backend dev",
"web:dev": "pnpm run -r --filter @metro-now/web dev",
"precommit": "pnpm format",
"format": "pnpm -r format && pnpm exec prettier . --write",
"format": "pnpm --recursive --parallel format && pnpm exec prettier . --write",
"format:check": "pnpm -r format:check && pnpm exec prettier . --check",
"docker:up:dev": "docker compose up postgres redis-stack",
"docker:up": "docker compose up -d --build",
Expand Down
1 change: 1 addition & 0 deletions packages/constants/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
18 changes: 17 additions & 1 deletion packages/constants/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
{
"name": "@metro-now/constants",
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"files": [
"dist"
],
"types": "./dist/esm/src/index.d.ts",
"exports": {
"require": "./dist/cjs/src/index.js",
"import": "./dist/esm/src/index.js"
},
"scripts": {
"build": "pnpm run --parallel --filter @metro-now/constants \"/(build:cjs|build:esm)/\"",
"build:cjs": "tsc --project tsconfig.cjs.json",
"build:esm": "tsc --project tsconfig.esm.json"
},
"devDependencies": {
"typescript": "^5"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ export {
SWAGGER_JSON_URL,
SWAGGER_PATH,
SWAGGER_URL,
} from "./src/api";
} from "./api";

export {
API_URL,
APPSTORE_URL,
HOMEPAGE_URL,
SOURCE_CODE_URL,
} from "./src/external";
} from "./external";
7 changes: 7 additions & 0 deletions packages/constants/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "CommonJS",
"outDir": "./dist/cjs/"
}
}
7 changes: 7 additions & 0 deletions packages/constants/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"outDir": "./dist/esm/"
}
}
18 changes: 18 additions & 0 deletions packages/constants/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"include": ["src/**/*"],
"compilerOptions": {
"moduleResolution": "Node",
"target": "ES2022",
"declaration": true,
"removeComments": true,
"allowSyntheticDefaultImports": true,
"incremental": true,
"composite": true,

"strict": true,
"strictPropertyInitialization": false,

"outDir": "dist",
"baseUrl": "."
}
}
6 changes: 5 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit dcbfc07

@vercel
Copy link

@vercel vercel bot commented on dcbfc07 Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

metro-now – ./

Please sign in to comment.