mirror of
https://github.com/teableio/teable
synced 2024-11-21 23:04:16 +00:00
feat: tsc
switches to swc
(#190)
* feat: `tsc` switches to `swc` [skip ci] --------- Co-authored-by: pengap <penganpingprivte@gmail.com>
This commit is contained in:
parent
168385ec85
commit
d31e08b50b
@ -1,7 +1,7 @@
|
||||
# All node_modules directories
|
||||
node_modules
|
||||
**/node_modules
|
||||
dist
|
||||
**/dist
|
||||
**/.next
|
||||
|
||||
# All secrets
|
||||
@ -53,4 +53,5 @@ tmp
|
||||
.vscode
|
||||
|
||||
# other
|
||||
**/.assets
|
||||
.DS_Store
|
||||
|
2
Makefile
2
Makefile
@ -208,13 +208,11 @@ db-push: ## connects to your database and adds Prisma models to your Prisma sch
|
||||
else echo "Unknown command."; fi
|
||||
|
||||
sqlite-mode: ## sqlite-mode
|
||||
@make gen-sqlite-prisma-schema
|
||||
@cd ./packages/db-main-prisma; \
|
||||
yarn prisma-generate --schema ./prisma/sqlite/schema.prisma; \
|
||||
yarn prisma-migrate deploy --schema ./prisma/sqlite/schema.prisma
|
||||
|
||||
postgres-mode: ## postgres-mode
|
||||
@make gen-postgres-prisma-schema
|
||||
@cd ./packages/db-main-prisma; \
|
||||
yarn prisma-generate --schema ./prisma/postgres/schema.prisma; \
|
||||
yarn prisma-migrate deploy --schema ./prisma/postgres/schema.prisma
|
||||
|
13
apps/nestjs-backend/.swcrc
Normal file
13
apps/nestjs-backend/.swcrc
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/swcrc",
|
||||
"sourceMaps": true,
|
||||
"jsc": {
|
||||
"parser": {
|
||||
"syntax": "typescript",
|
||||
"decorators": true,
|
||||
"dynamicImport": true
|
||||
},
|
||||
"baseUrl": "./"
|
||||
},
|
||||
"minify": false
|
||||
}
|
@ -4,6 +4,7 @@
|
||||
"entryFile": "index",
|
||||
"flat": true,
|
||||
"compilerOptions": {
|
||||
"tsConfigPath": "./tsconfig.json"
|
||||
"builder": "swc",
|
||||
"typeCheck": true
|
||||
}
|
||||
}
|
||||
|
@ -31,11 +31,11 @@
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"build": "nest build",
|
||||
"build": "nest build -b swc --type-check",
|
||||
"clean": "rimraf ./out ./coverage ./main ./dist ./tsconfig.tsbuildinfo ./node_modules/.cache",
|
||||
"dev": "nest start --watch",
|
||||
"start": "NODE_ENV=production node ./dist",
|
||||
"start:debug": "nest start --debug --watch",
|
||||
"dev": "nest start -b swc --type-check -w",
|
||||
"start": "nest start -b swc",
|
||||
"start:debug": "nest start -b swc --debug --watch",
|
||||
"check-dist": "es-check -v",
|
||||
"check-size": "size-limit --highlight-less",
|
||||
"test": "run-s test-unit test:e2e",
|
||||
@ -53,6 +53,8 @@
|
||||
"@faker-js/faker": "8.1.0",
|
||||
"@nestjs/cli": "10.1.18",
|
||||
"@nestjs/testing": "10.2.7",
|
||||
"@swc/cli": "0.1.62",
|
||||
"@swc/core": "1.3.92",
|
||||
"@teable-group/eslint-config-bases": "workspace:^",
|
||||
"@types/bcrypt": "5.0.0",
|
||||
"@types/cookie": "0.5.2",
|
||||
|
@ -7,6 +7,8 @@ services:
|
||||
context: ../
|
||||
dockerfile: ./dockers/teable/Dockerfile
|
||||
target: builder
|
||||
args:
|
||||
INTEGRATION_TEST: 1
|
||||
hostname: integration-test
|
||||
networks:
|
||||
- teable-net
|
||||
|
@ -34,6 +34,8 @@ RUN yarn install --immutable --inline-builds
|
||||
|
||||
FROM deps AS builder
|
||||
|
||||
ARG INTEGRATION_TEST
|
||||
|
||||
ENV NEXT_BUILD_ENV_TYPECHECK=false
|
||||
ENV NEXT_BUILD_ENV_LINT=false
|
||||
ENV NEXT_BUILD_ENV_OUTPUT=standalone
|
||||
@ -56,14 +58,15 @@ COPY --from=deps --link /workspace-install ./
|
||||
|
||||
# Optional: if the app depends on global /static shared assets like images, locales...
|
||||
RUN yarn workspace @teable-group/db-main-prisma prisma-generate --schema ./prisma/postgres/schema.prisma
|
||||
RUN yarn workspace @teable-group/app share-static-hardlink; \
|
||||
yarn g:build
|
||||
|
||||
# Does not play well with buildkit on CI
|
||||
# https://github.com/moby/buildkit/issues/1673
|
||||
RUN SKIP_POSTINSTALL=1 \
|
||||
yarn workspaces focus --production @teable-group/core @teable-group/openapi @teable-group/db-main-prisma \
|
||||
@teable-group/backend @teable-group/app
|
||||
# integration_test
|
||||
RUN if [ -n "$INTEGRATION_TEST" ]; \
|
||||
then yarn workspaces foreach -A -tv --exclude '@teable-group/(app|backend)' run build; \
|
||||
else yarn workspace @teable-group/app share-static-hardlink && \
|
||||
yarn g:build && \
|
||||
SKIP_POSTINSTALL=1 yarn workspaces focus --production @teable-group/core @teable-group/openapi @teable-group/db-main-prisma \
|
||||
@teable-group/backend @teable-group/app; \
|
||||
fi
|
||||
|
||||
##################################################################
|
||||
# Stage 3: Extract a minimal image from the build #
|
||||
|
Loading…
Reference in New Issue
Block a user