Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split config #578

Merged
merged 12 commits into from
Jan 11, 2019
Merged

Split config #578

merged 12 commits into from
Jan 11, 2019

Conversation

ralphtheninja
Copy link
Member

Ticks off final checkbox in #550

@Simon-Laux
Copy link
Member

Simon-Laux commented Jan 10, 2019

When we're already at it, should we add height and width arguments to rc to add like a --window-imensions or --win-dim [widht]x[height] argument? It might be useful for some users

@@ -176,12 +180,6 @@ function toggleDevTools () {
}
}

function getIconPath () {
return process.platform === 'win32'
? config.APP_ICON + '.ico'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken. Lets fix this when we need .ico file for windows.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a TODO comment about it in application-constants.js.

const log = require('../../logger').getLogger('renderer/state')

const SAVE_DEBOUNCE_INTERVAL = 1000

appConfig.filePath = path.join(config.CONFIG_PATH, 'config.json')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed, appConfig.filePath defaults to /path/to/config.json

@ralphtheninja
Copy link
Member Author

When we're already at it, should we add height and width arguments to rc to add like a --window-imensions or --win-dim [widht]x[height] argument? It might be useful for some users

Basic rule of thumb: Never add something that might be useful. We should add default values to rc though for the log stuff. Default is undefined at the moment and it's good practice to set e.g. false instead.

@ralphtheninja
Copy link
Member Author

I just realized that "splitting" here basically meant renaming config.js to application-constants.js and with a functional API instead of passing around an object. However, we cleaned up some stuff that wasn't needed / used in the process.

@ralphtheninja ralphtheninja changed the title Split config [wip] Split config Jan 11, 2019
@ralphtheninja ralphtheninja changed the title [wip] Split config Split config Jan 11, 2019
@Jikstra Jikstra merged commit 1666186 into master Jan 11, 2019
@Jikstra Jikstra deleted the split-config branch January 11, 2019 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants