Skip to content

Commit

Permalink
build api with esbuild, remove babel
Browse files Browse the repository at this point in the history
  • Loading branch information
tdjsnelling committed Feb 14, 2023
1 parent ce7fe08 commit bfcde50
Show file tree
Hide file tree
Showing 7 changed files with 247 additions and 1,143 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ client/.next
data/
config.js
.DS_Store
dist/
5 changes: 0 additions & 5 deletions api/.babelrc

This file was deleted.

7 changes: 4 additions & 3 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ FROM node:16-alpine
ENV NODE_ENV=production
ENV SENTRY_DSN="https://[email protected]/4504645996576768"
LABEL org.opencontainers.image.source=https://github.com/tdjsnelling/sqtracker
WORKDIR /sqtracker/app
WORKDIR /sqtracker/api
COPY . .
RUN yarn
RUN yarn install
RUN yarn build
EXPOSE 3001
CMD yarn start
CMD yarn start
13 changes: 7 additions & 6 deletions api/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "@sqtracker/api",
"version": "1.0.0-beta.1",
"version": "1.0.0-beta.2",
"private": true,
"license": "GPL-3.0-only",
"type": "module",
"scripts": {
"dev": "nodemon --exec babel-node src/index.js",
"start": "babel-node src/index.js"
"build": "esbuild src/index.js --bundle --platform=node --target=node16 --format=esm --packages=external --outdir=dist",
"start": "node dist/index.js",
"dev": "conc \"yarn build --watch\" \"nodemon dist/index.js\""
},
"dependencies": {
"@sentry/node": "^7.36.0",
Expand All @@ -17,6 +19,7 @@
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"dotenv": "^10.0.0",
"esbuild": "^0.17.8",
"express": "^4.17.1",
"http-proxy-middleware": "^2.0.1",
"jsonwebtoken": "^8.5.1",
Expand All @@ -33,9 +36,7 @@
"yup": "^0.32.11"
},
"devDependencies": {
"@babel/core": "^7.14.6",
"@babel/node": "^7.14.7",
"@babel/preset-env": "^7.14.7",
"concurrently": "^7.6.0",
"eslint": "^7.30.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sqtracker/client",
"version": "1.0.0-beta.1",
"version": "1.0.0-beta.2",
"private": true,
"license": "GPL-3.0-only",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sqtracker",
"version": "1.0.0-beta.1",
"version": "1.0.0-beta.2",
"private": true,
"license": "GPL-3.0-only",
"workspaces": [
Expand Down
1,360 changes: 233 additions & 1,127 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit bfcde50

Please sign in to comment.