-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
now we will use different folders depending on the environment we run the app (prod, dev & test)
- Loading branch information
Showing
12 changed files
with
363 additions
and
285 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
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,26 @@ | ||
import {app} from 'electron' | ||
import path from 'path' | ||
|
||
export const APP_FOLDER_NAME = | ||
process.env.NODE_ENV != 'production' && process.env.APP_FOLDER_NAME | ||
? process.env.APP_FOLDER_NAME | ||
: 'Mintter' | ||
|
||
export const APP_USER_DATA_PATH = path.join( | ||
app.getPath('appData'), | ||
APP_FOLDER_NAME, | ||
) | ||
|
||
console.log(`== ~ APP_FOLDER_NAME:`, APP_FOLDER_NAME) | ||
|
||
export function initPaths() { | ||
app.setPath('userData', APP_USER_DATA_PATH) | ||
console.log('===== userData', app.getPath('userData')) | ||
} | ||
|
||
export function setupTests() { | ||
app.setPath('userData', APP_USER_DATA_PATH) | ||
console.log('===== userData', app.getPath('userData')) | ||
} | ||
|
||
console.log(`== ~ process.env.NODE_ENV:`, process.env.NODE_ENV) |
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
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
Oops, something went wrong.