Skip to content

Commit

Permalink
feat: add env file
Browse files Browse the repository at this point in the history
1. Add env file
2. Add the staging packaging command

BUN-88
  • Loading branch information
b3aton authored and kris liu committed Jul 20, 2022
1 parent 3c5b855 commit 5fe035f
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/storefront/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NODE_ENV=production
VITE_B2B_BASIC_URL=https://dev-v2.bundleb2b.net/
2 changes: 2 additions & 0 deletions apps/storefront/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NODE_ENV=development
VITE_B2B_BASIC_URL=https://dev-v2.bundleb2b.net/
2 changes: 2 additions & 0 deletions apps/storefront/.env.staging
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NODE_ENV=development
VITE_B2B_BASIC_URL=https://dev-v2.bundleb2b.net/
1 change: 1 addition & 0 deletions apps/storefront/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build:staging": "tsc && vite build --mode staging",
"lint": "eslint \"**/*.{ts,tsx}\" --fix",
"preview": "vite preview"
},
Expand Down
3 changes: 3 additions & 0 deletions apps/storefront/src/config/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
B2B_BASIC_URL: import.meta.env.VITE_B2B_BASIC_URL,
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
],
"scripts": {
"build": "turbo run build",
"build:staging": "turbo run build:staging",
"dev": "turbo run dev --parallel",
"lint": "turbo run lint",
"prepare": "husky install"
Expand Down
4 changes: 4 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
},
"dev": {
"cache": false
},
"build:staging": {
"dependsOn": ["^build"],
"outputs": ["dist/**"]
}
}
}

0 comments on commit 5fe035f

Please sign in to comment.