Traditionally, NODE_ENV refers to an environment variable. For clarity,
let's keep it that way and don't reuse it in the renderer. Also, add a
note about explicitly overriding env vars for node-config.
// FREEBIE
Add the buildExpiration config and add it to the renderer's config
object. Use grunt to write the build expiration to
config/local-production.json which will override the default value (no
expiration) in production. Finally, run this grunt task as part of the
build process.
// FREEBIE
We only set the environment in package.json when it is packaged for
deployment. When we do that, we don't want to allow a local environment
variable to override it.
// FREEBIE
Introduce a top level view for navigating between the inbox and the
installer, enabling an in-window relink flow. Navigation is driven
through the openInbox and openInstaller global events.
// FREEBIE
Add environment-specific configs under `./config` and integrate with the
build system. Also changes package.json `files` from blacklist to
whitelist.
// FREEBIE
Database logging is helpful as a debugging tool, but it creates an
infinite loop with the debug log, which wants to write to the database,
which wants to write to the log, which wants to write to the database,
which wants to write to the log, which wants to write to the database,
which wants to write to the log, which wants to write to the database...
// FREEBIE
Spaces in the file name get escaped to %20. Then the percent sign gets
escaped again on the way to s3 upload, such that the object name on s3
ends up as %2520. To fix this, we can simply omit spaces from our
artifact names.
// FREEBIE
Move these to where the build expects them to be.
In theory electron-builder should generate these from a build/icon.icns
but that doesn't seem to be working.
// FREEBIE
`npm run icon-gen` builds icon files from png files in the images
directory, outputting to build/icon.{ico,icns} (the expected location
for electron-builder).
// FREEBIE
Just use the english locale for now. Load locale data from the
filesystem in the main process and pass it to the renderer preload
script via ipc. Note that we need the locale data to be available by the
time view scripts are loaded.
// FREEBIE
Set NODE_ENV at run time or build time to switch the app between dev and
production modes.
At build time, the current NODE_ENV will be included in the packaged
app's package.json file. At runtime we read NODE_ENV from package.json,
but also allow the local environment variable to override. A query
string parsed by a preload script exposes the value to the renderer,
which then determines whether we use the staging or production server.
Additionally, different environments have different user data
directories.
// FREEBIE