-
Notifications
You must be signed in to change notification settings - Fork 334
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
1 parent
7f9c6f0
commit 170c0da
Showing
8 changed files
with
33 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,13 @@ | ||
import path from 'path'; | ||
|
||
const isProduction = process.env.NODE_ENV === 'production'; | ||
const isForStandalone = process.env.STANDALONE === 'true'; | ||
// project's app directory path | ||
// development: /Users/user/entry_projects/entry-hw/app | ||
// production: /Users/user/entry_projects/entry-hw/dist/mac/Entry_HW.app/Contents/Resources | ||
const rootAppPath = (() => { | ||
if (isProduction) { | ||
if (isForStandalone) { | ||
return path.join(__dirname, '..', '..', '..', '..'); | ||
} else { | ||
return path.join(__dirname, '..', '..', '..', '..', '..', '..'); | ||
} | ||
} else { | ||
return path.join(__dirname, '..', '..'); | ||
} | ||
})(); | ||
|
||
let rootAppPath = path.join(__dirname, '..', '..'); | ||
|
||
export default { | ||
driver: path.join(rootAppPath, 'drivers'), | ||
firmware: path.join(rootAppPath, 'firmwares'), | ||
modules: path.join(rootAppPath, 'modules'), | ||
setRootAppPath: (nextPath: string) => { | ||
rootAppPath = nextPath; | ||
}, | ||
driver: () => path.join(rootAppPath, 'drivers'), | ||
firmware: () => path.join(rootAppPath, 'firmwares'), | ||
modules: () => path.join(rootAppPath, 'modules'), | ||
}; | ||
|
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