-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daniil Yankouski
committed
Apr 22, 2023
1 parent
4a03d13
commit df07a94
Showing
35 changed files
with
10,077 additions
and
5,256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"arrowParens": "avoid", | ||
"bracketSpacing": true, | ||
"printWidth": 100, | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"endOfLine": "lf" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import DotEnv from 'dotenv'; | ||
|
||
import { ViteEnvConfig, ViteMode, VitePlatform } from './config.types'; | ||
|
||
export const getEnvConfig = (mode: ViteMode, platform: VitePlatform): ViteEnvConfig => { | ||
const envFile = mode === 'preview' ? 'dev' : mode; | ||
const fileName = `${platform ? `.${platform}` : ''}.${envFile}.env`; | ||
const path = `./setup/env/${fileName}`; | ||
const result = DotEnv.config({ debug: true, override: false, path }); | ||
|
||
if (result.error) { | ||
throw result.error; | ||
} | ||
|
||
const config: ViteEnvConfig = { | ||
AUTH_TOKEN: process.env.AUTH_TOKEN, | ||
BACKEND_PROXIES: process.env.BACKEND_PROXIES, | ||
BACKEND_URL: process.env.BACKEND_URL, | ||
DEV_SERVER_HOST: process.env.DEV_SERVER_HOST, | ||
DEV_SERVER_PORT: process.env.DEV_SERVER_PORT, | ||
IS_DEV: false, | ||
}; | ||
|
||
// eslint-disable-next-line no-console | ||
console.log('[ENV_CONFIG]', config); | ||
|
||
return config; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.