Skip to content

Commit

Permalink
Web fix deployment and build (#21)
Browse files Browse the repository at this point in the history
* fix(size): added `.vercelignore` to ignore unrelated files

* fix(postinstall): move postinstall for rust to desktop

* chore(apps/web): updated command to reduce steps
  • Loading branch information
GervinFung authored Apr 13, 2024
1 parent 134f893 commit 2149d8d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
8 changes: 8 additions & 0 deletions .vercelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apps/desktop
apps/mobile
.github
.gitattributes
.prettierignore
LICENSE
README.md
apps/web/test/snapshot/snapshot-images
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
postinstall:
cd apps/desktop && make install-rust

# format
format-write:
pnpm --stream -r format-write
Expand All @@ -18,11 +15,10 @@ lint-workflows:

# web deployment
web-deploy-production:
vercel --prod --prebuilt
vercel --prod

deploy-web:
cd apps/web &&\
make build-production &&\
cd ../../ &&\
mv apps/web/.next .vercel/output &&\
make web-deploy-production
1 change: 1 addition & 0 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"license": "GPL",
"description": "A UI/UX friendly desktop application to learn more about Modern Periodic Table of Elements",
"scripts": {
"postinstall": "make install-rust",
"format-check": "make format-check",
"format-write": "make format-write"
},
Expand Down
4 changes: 2 additions & 2 deletions apps/web/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ generate-web-pages:
pnpm shx cp next/web.mjs next.config.mjs &&\
pnpm vite-node script/pages/web.ts

generate-web-pages-and-schema: generate-web-pages generate-schema
generate-web-pages-and-schema: generate-web-pages generate-schema generate-webmanifest

generate-desktop-pages:
pnpm shx cp next/desktop.mjs next.config.mjs &&\
Expand Down Expand Up @@ -69,7 +69,7 @@ start-production: copy-env-production generate-web-pages-and-schema clear-cache
## build
build-development: clear-cache copy-env-development generate-web-pages-and-schema build

build-production: clear-cache copy-env-production generate-web-pages-and-schema generate build
build-production: clear-cache copy-env-production clear-snapshot generate-web-pages-and-schema build generate-sitemap

build-testing: clear-cache copy-env-testing generate-web-pages-and-schema build

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "GPL",
"description": "A UI/UX friendly applications to learn more about Modern Periodic Table of Elements",
"scripts": {
"postinstall": "prettier-config-generate && make postinstall"
"postinstall": "prettier-config-generate"
},
"devDependencies": {
"@poolofdeath20/prettier-config-generator": "^0.0.1",
Expand Down

0 comments on commit 2149d8d

Please sign in to comment.