Initial electron app with configs
52
desktop-app/.dockerignore
Normal file
|
@ -0,0 +1,52 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
.eslintcache
|
||||
|
||||
# Dependency directory
|
||||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
|
||||
node_modules
|
||||
|
||||
# OSX
|
||||
.DS_Store
|
||||
|
||||
# flow-typed
|
||||
flow-typed/npm/*
|
||||
!flow-typed/npm/module_vx.x.x.js
|
||||
|
||||
# App packaged
|
||||
release
|
||||
app/main.prod.js
|
||||
app/main.prod.js.map
|
||||
app/renderer.prod.js
|
||||
app/renderer.prod.js.map
|
||||
app/style.css
|
||||
app/style.css.map
|
||||
dist
|
||||
dll
|
||||
main.js
|
||||
main.js.map
|
||||
|
||||
.idea
|
||||
npm-debug.log.*
|
||||
.*.dockerfile
|
12
desktop-app/.editorconfig
Normal file
|
@ -0,0 +1,12 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
56
desktop-app/.eslintignore
Normal file
|
@ -0,0 +1,56 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
.eslintcache
|
||||
|
||||
# Dependency directory
|
||||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
|
||||
node_modules
|
||||
|
||||
# OSX
|
||||
.DS_Store
|
||||
|
||||
# flow-typed
|
||||
flow-typed/npm/*
|
||||
!flow-typed/npm/module_vx.x.x.js
|
||||
|
||||
# App packaged
|
||||
release
|
||||
app/main.prod.js
|
||||
app/main.prod.js.map
|
||||
app/renderer.prod.js
|
||||
app/renderer.prod.js.map
|
||||
app/style.css
|
||||
app/style.css.map
|
||||
dist
|
||||
dll
|
||||
main.js
|
||||
main.js.map
|
||||
|
||||
.idea
|
||||
npm-debug.log.*
|
||||
__snapshots__
|
||||
|
||||
# Package.json
|
||||
package.json
|
||||
.travis.yml
|
72
desktop-app/.eslintrc
Normal file
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
"parser": "babel-eslint",
|
||||
"parserOptions": {
|
||||
"sourceType": "module",
|
||||
"allowImportExportEverywhere": true
|
||||
},
|
||||
"extends": ["airbnb", "prettier", "prettier/flowtype", "prettier/react"],
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true
|
||||
},
|
||||
"rules": {
|
||||
"arrow-parens": ["off"],
|
||||
"compat/compat": "error",
|
||||
"consistent-return": "off",
|
||||
"comma-dangle": "off",
|
||||
"flowtype/boolean-style": ["error", "boolean"],
|
||||
"flowtype/define-flow-type": "warn",
|
||||
"flowtype/delimiter-dangle": ["error", "never"],
|
||||
"flowtype/generic-spacing": ["error", "never"],
|
||||
"flowtype/no-primitive-constructor-types": "error",
|
||||
"flowtype/no-weak-types": "warn",
|
||||
"flowtype/object-type-delimiter": ["error", "comma"],
|
||||
"flowtype/require-parameter-type": "off",
|
||||
"flowtype/require-return-type": "off",
|
||||
"flowtype/require-valid-file-annotation": "off",
|
||||
"flowtype/semi": ["error", "always"],
|
||||
"flowtype/space-after-type-colon": ["error", "always"],
|
||||
"flowtype/space-before-generic-bracket": ["error", "never"],
|
||||
"flowtype/space-before-type-colon": ["error", "never"],
|
||||
"flowtype/union-intersection-spacing": ["error", "always"],
|
||||
"flowtype/use-flow-type": "error",
|
||||
"flowtype/valid-syntax": "error",
|
||||
"generator-star-spacing": "off",
|
||||
"import/no-unresolved": "error",
|
||||
"import/no-extraneous-dependencies": "off",
|
||||
"jsx-a11y/anchor-is-valid": "off",
|
||||
"no-console": "off",
|
||||
"no-use-before-define": "off",
|
||||
"no-multi-assign": "off",
|
||||
"promise/param-names": "error",
|
||||
"promise/always-return": "error",
|
||||
"promise/catch-or-return": "error",
|
||||
"promise/no-native": "off",
|
||||
"react/sort-comp": [
|
||||
"error",
|
||||
{
|
||||
"order": [
|
||||
"type-annotations",
|
||||
"static-methods",
|
||||
"lifecycle",
|
||||
"everything-else",
|
||||
"render"
|
||||
]
|
||||
}
|
||||
],
|
||||
"react/jsx-no-bind": "off",
|
||||
"react/jsx-filename-extension": [
|
||||
"error",
|
||||
{ "extensions": [".js", ".jsx"] }
|
||||
],
|
||||
"react/prefer-stateless-function": "off"
|
||||
},
|
||||
"plugins": ["flowtype", "import", "promise", "compat", "react"],
|
||||
"settings": {
|
||||
"import/resolver": {
|
||||
"webpack": {
|
||||
"config": "configs/webpack.config.eslint.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
26
desktop-app/.flowconfig
Normal file
|
@ -0,0 +1,26 @@
|
|||
[ignore]
|
||||
<PROJECT_ROOT>/app/main.prod.js
|
||||
<PROJECT_ROOT>/app/main.prod.js.map
|
||||
<PROJECT_ROOT>/app/dist/.*
|
||||
<PROJECT_ROOT>/resources/.*
|
||||
<PROJECT_ROOT>/node_modules/webpack-cli
|
||||
<PROJECT_ROOT>/release/.*
|
||||
<PROJECT_ROOT>/dll/.*
|
||||
<PROJECT_ROOT>/release/.*
|
||||
<PROJECT_ROOT>/git/.*
|
||||
|
||||
[include]
|
||||
|
||||
[libs]
|
||||
|
||||
[options]
|
||||
esproposal.class_static_fields=enable
|
||||
esproposal.class_instance_fields=enable
|
||||
esproposal.export_star_as=enable
|
||||
module.name_mapper.extension='css' -> '<PROJECT_ROOT>/internals/flow/CSSModule.js.flow'
|
||||
module.name_mapper.extension='styl' -> '<PROJECT_ROOT>/internals/flow/CSSModule.js.flow'
|
||||
module.name_mapper.extension='scss' -> '<PROJECT_ROOT>/internals/flow/CSSModule.js.flow'
|
||||
module.name_mapper.extension='png' -> '<PROJECT_ROOT>/internals/flow/WebpackAsset.js.flow'
|
||||
module.name_mapper.extension='jpg' -> '<PROJECT_ROOT>/internals/flow/WebpackAsset.js.flow'
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue
|
6
desktop-app/.gitattributes
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
* text eol=lf
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.ico binary
|
||||
*.icns binary
|
53
desktop-app/.github/ISSUE_TEMPLATE.md
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
<!--- Provide a general summary of the issue in the Title above -->
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- [ ] Using yarn
|
||||
- [ ] Using an up-to-date master branch
|
||||
- [ ] Using latest version of devtools. See [wiki for howto update](https://github.com/electron-react-boilerplate/electron-react-boilerplate/wiki/DevTools)
|
||||
- [ ] Link to stacktrace in a Gist (for bugs)
|
||||
- [ ] For issue in production release, devtools output of `DEBUG_PROD=true yarn build && yarn start`
|
||||
- [ ] Tried solutions mentioned in [#400](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/400)
|
||||
|
||||
## Expected Behavior
|
||||
|
||||
<!--- If you're describing a bug, tell us what should happen -->
|
||||
<!--- If you're suggesting a change/improvement, tell us how it should work -->
|
||||
|
||||
## Current Behavior
|
||||
|
||||
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
|
||||
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
|
||||
|
||||
## Possible Solution
|
||||
|
||||
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
|
||||
<!--- or ideas how to implement the addition or change -->
|
||||
|
||||
## Steps to Reproduce (for bugs)
|
||||
|
||||
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
|
||||
<!--- reproduce this bug. Include code to reproduce, if relevant -->
|
||||
|
||||
1.
|
||||
|
||||
2.
|
||||
|
||||
3.
|
||||
|
||||
4.
|
||||
|
||||
## Context
|
||||
|
||||
<!--- How has this issue affected you? What are you trying to accomplish? -->
|
||||
<!--- Did you make any changes to the boilerplate after cloning it? -->
|
||||
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
|
||||
|
||||
## Your Environment
|
||||
|
||||
<!--- Include as many relevant details about the environment you experienced the bug in -->
|
||||
|
||||
- Node version :
|
||||
- Version or Branch used :
|
||||
- Operating System and version :
|
||||
- Link to your project :
|
17
desktop-app/.github/stale.yml
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 60
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 7
|
||||
# Issues with these labels will never be considered stale
|
||||
exemptLabels:
|
||||
- pr
|
||||
- discussion
|
||||
- e2e
|
||||
- enhancement
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: false
|
51
desktop-app/.gitignore
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
.eslintcache
|
||||
|
||||
# Dependency directory
|
||||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
|
||||
node_modules
|
||||
|
||||
# OSX
|
||||
.DS_Store
|
||||
|
||||
# flow-typed
|
||||
flow-typed/npm/*
|
||||
!flow-typed/npm/module_vx.x.x.js
|
||||
|
||||
# App packaged
|
||||
release
|
||||
app/main.prod.js
|
||||
app/main.prod.js.map
|
||||
app/renderer.prod.js
|
||||
app/renderer.prod.js.map
|
||||
app/style.css
|
||||
app/style.css.map
|
||||
dist
|
||||
dll
|
||||
main.js
|
||||
main.js.map
|
||||
|
||||
.idea
|
||||
npm-debug.log.*
|
13
desktop-app/.prettierrc
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"overrides": [
|
||||
{
|
||||
"files": [".prettierrc", ".babelrc", ".eslintrc", ".stylelintrc"],
|
||||
"options": {
|
||||
"parser": "json"
|
||||
}
|
||||
}
|
||||
],
|
||||
"singleQuote": true,
|
||||
"bracketSpacing": false,
|
||||
"trailingComma": "es5"
|
||||
}
|
3
desktop-app/.stylelintrc
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": ["stylelint-config-standard", "stylelint-config-prettier"]
|
||||
}
|
4
desktop-app/.testcafe-electron-rc
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"mainWindowUrl": "./app/app.html",
|
||||
"appPath": "."
|
||||
}
|
84
desktop-app/.travis.yml
Normal file
|
@ -0,0 +1,84 @@
|
|||
matrix:
|
||||
allow_failures:
|
||||
- os: windows
|
||||
include:
|
||||
- os: osx
|
||||
language: node_js
|
||||
node_js:
|
||||
- node
|
||||
env:
|
||||
- ELECTRON_CACHE=$HOME/.cache/electron
|
||||
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
|
||||
|
||||
- os: linux
|
||||
language: node_js
|
||||
node_js:
|
||||
- node
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- gcc-multilib
|
||||
- g++-8
|
||||
- g++-multilib
|
||||
- icnsutils
|
||||
- graphicsmagick
|
||||
- xz-utils
|
||||
- xorriso
|
||||
- rpm
|
||||
|
||||
- os: windows
|
||||
language: node_js
|
||||
node_js:
|
||||
- node
|
||||
env:
|
||||
- ELECTRON_CACHE=$HOME/.cache/electron
|
||||
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
|
||||
|
||||
before_cache:
|
||||
- rm -rf $HOME/.cache/electron-builder/wine
|
||||
|
||||
cache:
|
||||
yarn: true
|
||||
directories:
|
||||
- node_modules
|
||||
- $(npm config get prefix)/lib/node_modules
|
||||
- flow-typed
|
||||
- $HOME/.cache/electron
|
||||
- $HOME/.cache/electron-builder
|
||||
|
||||
before_install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX="g++-8"; fi
|
||||
|
||||
install:
|
||||
- yarn --ignore-engines
|
||||
# On Linux, initialize "virtual display". See before_script
|
||||
- |
|
||||
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
|
||||
/sbin/start-stop-daemon \
|
||||
--start \
|
||||
--quiet \
|
||||
--pidfile /tmp/custom_xvfb_99.pid \
|
||||
--make-pidfile \
|
||||
--background \
|
||||
--exec /usr/bin/Xvfb \
|
||||
-- :99 -ac -screen 0 1280x1024x16
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
before_script:
|
||||
# On Linux, create a "virtual display". This allows browsers to work properly
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export DISPLAY=:99.0; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sh -e /etc/init.d/xvfb start; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sleep 3; fi
|
||||
|
||||
script:
|
||||
- yarn package-ci
|
||||
- yarn lint
|
||||
- yarn flow
|
||||
# HACK: Temporarily ignore `yarn test` on linux
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then yarn test; fi
|
||||
- yarn build-e2e
|
||||
- yarn test-e2e
|
36
desktop-app/.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"editor.formatOnSave": true,
|
||||
"files.associations": {
|
||||
".babelrc": "jsonc",
|
||||
".eslintrc": "jsonc",
|
||||
".prettierrc": "jsonc",
|
||||
|
||||
".stylelintrc": "json",
|
||||
|
||||
".dockerignore": "ignore",
|
||||
".eslintignore": "ignore",
|
||||
".flowconfig": "ignore"
|
||||
},
|
||||
|
||||
"javascript.validate.enable": false,
|
||||
"javascript.format.enable": false,
|
||||
"typescript.validate.enable": false,
|
||||
"typescript.format.enable": false,
|
||||
|
||||
"flow.useNPMPackagedFlow": true,
|
||||
"search.exclude": {
|
||||
".git": true,
|
||||
".eslintcache": true,
|
||||
"app/dist": true,
|
||||
"app/main.prod.js": true,
|
||||
"app/main.prod.js.map": true,
|
||||
"bower_components": true,
|
||||
"dll": true,
|
||||
"flow-typed": true,
|
||||
"release": true,
|
||||
"node_modules": true,
|
||||
"npm-debug.log.*": true,
|
||||
"test/**/__snapshots__": true,
|
||||
"yarn.lock": true
|
||||
}
|
||||
}
|
441
desktop-app/CHANGELOG.md
Normal file
|
@ -0,0 +1,441 @@
|
|||
# 0.17.1 (2018.11.20)
|
||||
|
||||
- Fix `yarn test-e2e` and testcafe for single package.json structure
|
||||
- Fixes incorrect path in `yarn start` script
|
||||
- Bumped deps
|
||||
- Bump g++ in travis
|
||||
- Change clone arguments to clone only master
|
||||
- Change babel config to target current electron version
|
||||
|
||||
For full change list, see https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2021
|
||||
|
||||
# 0.17.0 (2018.10.30)
|
||||
|
||||
- upgraded to `babel@7` (thanks to @vikr01 🎉🎉🎉)
|
||||
- migrated from [two `package.json` structure](https://www.electron.build/tutorials/two-package-structure) (thanks to @HyperSprite!)
|
||||
- initial auto update support (experimental)
|
||||
- migrate from greenkeeper to [renovate](https://renovatebot.com)
|
||||
- added issue template
|
||||
- use `babel-preset-env` to target current electron version
|
||||
- add [opencollective](https://opencollective.com/electron-react-boilerplate-594) banner message display in postinstall script (help support ERB 🙏)
|
||||
- fix failing ci issues
|
||||
|
||||
# 0.16.0 (2018.10.3)
|
||||
|
||||
- removed unused dependencies
|
||||
- migrate from `react-redux-router` to `connect-react-router`
|
||||
- move webpack configs to `./webpack` dir
|
||||
- use `g++` on travis when testing linux
|
||||
- migrate from `spectron` to `testcafe` for e2e tests
|
||||
- add linting support for config styles
|
||||
- changed stylelint config
|
||||
- temporarily disabled flow in appveyor to make ci pass
|
||||
- added necessary infra to publish releases from ci
|
||||
|
||||
# 0.15.0 (2018.8.25)
|
||||
|
||||
- Performance: cache webpack uglify results
|
||||
- Feature: add start minimized feature
|
||||
- Feature: lint and fix styles with prettier and stylelint
|
||||
- Feature: add greenkeeper support
|
||||
|
||||
# 0.14.0 (2018.5.24)
|
||||
|
||||
- Improved CI timings
|
||||
- Migrated README commands to yarn from npm
|
||||
- Improved vscode config
|
||||
- Updated all dependencies to latest semver
|
||||
- Fix `electron-rebuild` script bug
|
||||
- Migrated to `mini-css-extract-plugin` from `extract-text-plugin`
|
||||
- Added `optimize-css-assets-webpack-plugin`
|
||||
- Run `prettier` on json, css, scss, and more filetypes
|
||||
|
||||
# 0.13.3 (2018.5.24)
|
||||
|
||||
- Add git precommit hook, when git commit will use `prettier` to format git add code
|
||||
- Add format code function in `lint-fix` npm script which can use `prettier` to format project js code
|
||||
|
||||
# 0.13.2 (2018.1.31)
|
||||
|
||||
- Hot Module Reload (HMR) fixes
|
||||
- Bumped all dependencies to latest semver
|
||||
- Prevent error propagation of `CheckNativeDeps` script
|
||||
|
||||
# 0.13.1 (2018.1.13)
|
||||
|
||||
- Hot Module Reload (HMR) fixes
|
||||
- Bumped all dependencies to latest semver
|
||||
- Fixed electron-rebuild script
|
||||
- Fixed tests scripts to run on all platforms
|
||||
- Skip redux logs in console in test ENV
|
||||
|
||||
# 0.13.0 (2018.1.6)
|
||||
|
||||
#### Additions
|
||||
|
||||
- Add native dependencies check on postinstall
|
||||
- Updated all dependencies to latest semver
|
||||
|
||||
# 0.12.0 (2017.7.8)
|
||||
|
||||
#### Misc
|
||||
|
||||
- Removed `babel-polyfill`
|
||||
- Renamed and alphabetized npm scripts
|
||||
|
||||
#### Breaking
|
||||
|
||||
- Changed node dev `__dirname` and `__filename` to node built in fn's (https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/1035)
|
||||
- Renamed `app/bundle.js` to `app/renderer.prod.js` for consistency
|
||||
- Renamed `dll/vendor.js` to `dll/renderer.dev.dll.js` for consistency
|
||||
|
||||
#### Additions
|
||||
|
||||
- Enable node_modules cache on CI
|
||||
|
||||
# 0.11.2 (2017.5.1)
|
||||
|
||||
Yay! Another patch release. This release mostly includes refactorings and router bug fixes. Huge thanks to @anthonyraymond!
|
||||
|
||||
⚠️ Windows electron builds are failing because of [this issue](https://github.com/electron/electron/issues/9321). This is not an issue with the boilerplate ⚠️
|
||||
|
||||
#### Breaking
|
||||
|
||||
- **Renamed `./app/main.development.js` => `./app/main.{dev,prod}.js`:** [#963](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/963)
|
||||
|
||||
#### Fixes
|
||||
|
||||
- **Fixed reloading when not on `/` path:** [#958](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/958) [#949](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/949)
|
||||
|
||||
#### Additions
|
||||
|
||||
- **Added support for stylefmt:** [#960](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/960)
|
||||
|
||||
# 0.11.1 (2017.4.23)
|
||||
|
||||
You can now debug the production build with devtools like so:
|
||||
|
||||
```
|
||||
DEBUG_PROD=true npm run package
|
||||
```
|
||||
|
||||
🎉🎉🎉
|
||||
|
||||
#### Additions
|
||||
|
||||
- **Added support for debugging production build:** [#fab245a](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/941/commits/fab245a077d02a09630f74270806c0c534a4ff95)
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
- **Fixed bug related to importing native dependencies:** [#933](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/933)
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **Updated all deps to latest semver**
|
||||
|
||||
# 0.11.0 (2017.4.19)
|
||||
|
||||
Here's the most notable changes since `v0.10.0`. Its been about a year since a release has been pushed. Expect a new release to be published every 3-4 weeks.
|
||||
|
||||
#### Breaking Changes
|
||||
|
||||
- **Dropped support for node < 6**
|
||||
- **Refactored webpack config files**
|
||||
- **Migrate to two-package.json project structure**
|
||||
- **Updated all devDeps to latest semver**
|
||||
- **Migrated to Jest:** [#768](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/768)
|
||||
- **Migrated to `react-router@4`**
|
||||
- **Migrated to `electron-builder@4`**
|
||||
- **Migrated to `webpack@2`**
|
||||
- **Migrated to `react-hot-loader@3`**
|
||||
- **Changed default live reload server PORT to `1212` from `3000`**
|
||||
|
||||
#### Additions
|
||||
|
||||
- **Added support for Yarn:** [#451](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/451)
|
||||
- **Added support for Flow:** [#425](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/425)
|
||||
- **Added support for stylelint:** [#911](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/911)
|
||||
- **Added support for electron-builder:** [#876](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/876)
|
||||
- **Added optional support for SASS:** [#880](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/880)
|
||||
- **Added support for eslint-plugin-flowtype:** [#911](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/911)
|
||||
- **Added support for appveyor:** [#280](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/280)
|
||||
- **Added support for webpack dlls:** [#860](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/860)
|
||||
- **Route based code splitting:** [#884](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/884)
|
||||
- **Added support for Webpack Bundle Analyzer:** [#922](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/922)
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **Parallelize renderer and main build processes when running `npm run build`**
|
||||
- **Dynamically generate electron app menu**
|
||||
- **Improved vscode integration:** [#856](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/856)
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
- **Fixed hot module replacement race condition bug:** [#917](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/917) [#920](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/920)
|
||||
|
||||
# 0.10.0 (2016.4.18)
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **Use Babel in main process with Webpack build:** [#201](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/201)
|
||||
- **Change targets to built-in support by webpack:** [#197](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/197)
|
||||
- **use es2015 syntax for webpack configs:** [#195](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/195)
|
||||
- **Open application when webcontent is loaded:** [#192](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/192)
|
||||
- **Upgraded dependencies**
|
||||
|
||||
#### Bug fixed
|
||||
|
||||
- **Fix `npm list electron-prebuilt` in package.js:** [#188](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/188)
|
||||
|
||||
# 0.9.0 (2016.3.23)
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **Added [redux-logger](https://github.com/fcomb/redux-logger)**
|
||||
- **Upgraded [react-router-redux](https://github.com/reactjs/react-router-redux) to v4**
|
||||
- **Upgraded dependencies**
|
||||
- **Added `npm run dev` command:** [#162](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/162)
|
||||
- **electron to v0.37.2**
|
||||
|
||||
#### Breaking Changes
|
||||
|
||||
- **css module as default:** [#154](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/154).
|
||||
- **set default NODE_ENV to production:** [#140](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/140)
|
||||
|
||||
# 0.8.0 (2016.2.17)
|
||||
|
||||
#### Bug fixed
|
||||
|
||||
- **Fix lint errors**
|
||||
- **Fix Webpack publicPath for production builds**: [#119](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/119).
|
||||
- **package script now chooses correct OS icon extension**
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **babel 6**
|
||||
- **Upgrade Dependencies**
|
||||
- **Enable CSS source maps**
|
||||
- **Add json-loader**: [#128](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/128).
|
||||
- **react-router 2.0 and react-router-redux 3.0**
|
||||
|
||||
# 0.7.1 (2015.12.27)
|
||||
|
||||
#### Bug fixed
|
||||
|
||||
- **Fixed npm script on windows 10:** [#103](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/103).
|
||||
- **history and react-router version bump**: [#109](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/109), [#110](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/110).
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **electron 0.36**
|
||||
|
||||
# 0.7.0 (2015.12.16)
|
||||
|
||||
#### Bug fixed
|
||||
|
||||
- **Fixed process.env.NODE_ENV variable in webpack:** [#74](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/74).
|
||||
- **add missing object-assign**: [#76](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/76).
|
||||
- **packaging in npm@3:** [#77](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/77).
|
||||
- **compatibility in windows:** [#100](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/100).
|
||||
- **disable chrome debugger in production env:** [#102](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/102).
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **redux**
|
||||
- **css-modules**
|
||||
- **upgrade to react-router 1.x**
|
||||
- **unit tests**
|
||||
- **e2e tests**
|
||||
- **travis-ci**
|
||||
- **upgrade to electron 0.35.x**
|
||||
- **use es2015**
|
||||
- **check dev engine for node and npm**
|
||||
|
||||
# 0.6.5 (2015.11.7)
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **Bump style-loader to 0.13**
|
||||
- **Bump css-loader to 0.22**
|
||||
|
||||
# 0.6.4 (2015.10.27)
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **Bump electron-debug to 0.3**
|
||||
|
||||
# 0.6.3 (2015.10.26)
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **Initialize ExtractTextPlugin once:** [#64](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/64).
|
||||
|
||||
# 0.6.2 (2015.10.18)
|
||||
|
||||
#### Bug fixed
|
||||
|
||||
- **Babel plugins production env not be set properly:** [#57](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/57).
|
||||
|
||||
# 0.6.1 (2015.10.17)
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **Bump electron to v0.34.0**
|
||||
|
||||
# 0.6.0 (2015.10.16)
|
||||
|
||||
#### Breaking Changes
|
||||
|
||||
- **From react-hot-loader to react-transform**
|
||||
|
||||
# 0.5.2 (2015.10.15)
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **Run tests with babel-register:** [#29](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/29).
|
||||
|
||||
# 0.5.1 (2015.10.12)
|
||||
|
||||
#### Bug fixed
|
||||
|
||||
- **Fix #51:** use `path.join(__dirname` instead of `./`.
|
||||
|
||||
# 0.5.0 (2015.10.11)
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **Simplify webpack config** see [#50](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/50).
|
||||
|
||||
#### Breaking Changes
|
||||
|
||||
- **webpack configs**
|
||||
- **port changed:** changed default port from 2992 to 3000.
|
||||
- **npm scripts:** remove `start-dev` and `dev-server`. rename `hot-dev-server` to `hot-server`.
|
||||
|
||||
# 0.4.3 (2015.9.22)
|
||||
|
||||
#### Bug fixed
|
||||
|
||||
- **Fix #45 zeromq crash:** bump version of `electron-prebuilt`.
|
||||
|
||||
# 0.4.2 (2015.9.15)
|
||||
|
||||
#### Bug fixed
|
||||
|
||||
- **run start-hot breaks chrome refresh(CTRL+R) (#42)**: bump `electron-debug` to `0.2.1`
|
||||
|
||||
# 0.4.1 (2015.9.11)
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **use electron-prebuilt version for packaging (#33)**
|
||||
|
||||
# 0.4.0 (2015.9.5)
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **update dependencies**
|
||||
|
||||
# 0.3.0 (2015.8.31)
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **eslint-config-airbnb**
|
||||
|
||||
# 0.2.10 (2015.8.27)
|
||||
|
||||
#### Features
|
||||
|
||||
- **custom placeholder icon**
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **electron-renderer as target:** via [webpack-target-electron-renderer](https://github.com/chentsulin/webpack-target-electron-renderer)
|
||||
|
||||
# 0.2.9 (2015.8.18)
|
||||
|
||||
#### Bug fixed
|
||||
|
||||
- **Fix hot-reload**
|
||||
|
||||
# 0.2.8 (2015.8.13)
|
||||
|
||||
#### Improvements
|
||||
|
||||
- **bump electron-debug**
|
||||
- **babelrc**
|
||||
- **organize webpack scripts**
|
||||
|
||||
# 0.2.7 (2015.7.9)
|
||||
|
||||
#### Bug fixed
|
||||
|
||||
- **defaultProps:** fix typos.
|
||||
|
||||
# 0.2.6 (2015.7.3)
|
||||
|
||||
#### Features
|
||||
|
||||
- **menu**
|
||||
|
||||
#### Bug fixed
|
||||
|
||||
- **package.js:** include webpack build.
|
||||
|
||||
# 0.2.5 (2015.7.1)
|
||||
|
||||
#### Features
|
||||
|
||||
- **NPM Script:** support multi-platform
|
||||
- **package:** `--all` option
|
||||
|
||||
# 0.2.4 (2015.6.9)
|
||||
|
||||
#### Bug fixed
|
||||
|
||||
- **Eslint:** typo, [#17](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/17) and improve `.eslintrc`
|
||||
|
||||
# 0.2.3 (2015.6.3)
|
||||
|
||||
#### Features
|
||||
|
||||
- **Package Version:** use latest release electron version as default
|
||||
- **Ignore Large peerDependencies**
|
||||
|
||||
#### Bug fixed
|
||||
|
||||
- **Npm Script:** typo, [#6](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/6)
|
||||
- **Missing css:** [#7](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/7)
|
||||
|
||||
# 0.2.2 (2015.6.2)
|
||||
|
||||
#### Features
|
||||
|
||||
- **electron-debug**
|
||||
|
||||
#### Bug fixed
|
||||
|
||||
- **Webpack:** add `.json` and `.node` to extensions for imitating node require.
|
||||
- **Webpack:** set `node_modules` to externals for native module support.
|
||||
|
||||
# 0.2.1 (2015.5.30)
|
||||
|
||||
#### Bug fixed
|
||||
|
||||
- **Webpack:** #1, change build target to `atom`.
|
||||
|
||||
# 0.2.0 (2015.5.30)
|
||||
|
||||
#### Features
|
||||
|
||||
- **Ignore:** `test`, `tools`, `release` folder and devDependencies in `package.json`.
|
||||
- **Support asar**
|
||||
- **Support icon**
|
||||
|
||||
# 0.1.0 (2015.5.27)
|
||||
|
||||
#### Features
|
||||
|
||||
- **Webpack:** babel, react-hot, ...
|
||||
- **Flux:** actions, api, components, containers, stores..
|
||||
- **Package:** darwin (osx), linux and win32 (windows) platform.
|
22
desktop-app/LICENSE
Normal file
|
@ -0,0 +1,22 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-present C. T. Lin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
265
desktop-app/README.md
Normal file
|
@ -0,0 +1,265 @@
|
|||
<div align="center">
|
||||
<br>
|
||||
<img src="https://user-images.githubusercontent.com/12294525/44203609-77d50800-a147-11e8-98f0-f2403527abdc.png" width="600px" />
|
||||
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<p align="center">
|
||||
A boilerplate for Scalable Cross-Platform Desktop Apps based on <a href="http://electron.atom.io/">Electron</a>, <a href="https://facebook.github.io/react/">React</a>, <a href="https://github.com/reactjs/redux">Redux</a>, <a href="https://github.com/reactjs/react-router">React Router</a>, <a href="http://webpack.github.io/docs/">Webpack</a> and <a href="https://github.com/gaearon/react-hot-loader">React Hot Loader</a> for rapid application development (HMR).
|
||||
</p>
|
||||
|
||||
<div align="center">
|
||||
<br>
|
||||
<img src="https://forthebadge.com/images/badges/built-with-love.svg" />
|
||||
<img src="https://forthebadge.com/images/badges/made-with-javascript.svg" />
|
||||
<img src="https://forthebadge.com/images/badges/for-you.svg" />
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div align="center">
|
||||
|
||||
<a href="https://facebook.github.io/react/"><img src="./internals/img/react-padded-90.png" /></a>
|
||||
<a href="https://webpack.github.io/"><img src="./internals/img/webpack-padded-90.png" /></a>
|
||||
<a href="http://redux.js.org/"><img src="./internals/img/redux-padded-90.png" /></a>
|
||||
<a href="https://github.com/ReactTraining/react-router"><img src="./internals/img/react-router-padded-90.png" /></a>
|
||||
<a href="https://flowtype.org/"><img src="./internals/img/flow-padded-90.png" /></a>
|
||||
<a href="http://eslint.org/"><img src="./internals/img/eslint-padded-90.png" /></a>
|
||||
<a href="https://facebook.github.io/jest/"><img src="./internals/img/jest-padded-90.png" /></a>
|
||||
<a href="https://yarnpkg.com/"><img src="./internals/img/yarn-padded-90.png" /></a>
|
||||
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
<div align="center">
|
||||
|
||||
[![Build Status][travis-image]][travis-url]
|
||||
[![Appveyor Build Status][appveyor-image]][appveyor-url]
|
||||
[![Dependency Status][david_img]][david_site]
|
||||
[![DevDependency Status][david_img_dev]][david_site_dev]
|
||||
[![Github Tag][github-tag-image]][github-tag-url]
|
||||
[![Join the chat at https://gitter.im/electron-react-boilerplate/Lobby](https://badges.gitter.im/electron-react-boilerplate/Lobby.svg)](https://gitter.im/electron-react-boilerplate/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[![OpenCollective](https://opencollective.com/electron-react-boilerplate/backers/badge.svg)](#backers)
|
||||
[![OpenCollective](https://opencollective.com/electron-react-boilerplate/sponsors/badge.svg)](#sponsors)
|
||||
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
|
||||
![Electron Boilerplate Demo](https://cloud.githubusercontent.com/assets/3382565/10557547/b1f07a4e-74e3-11e5-8d27-79ab6947d429.gif)
|
||||
|
||||
</div>
|
||||
|
||||
## Install
|
||||
|
||||
- **If you have installation or compilation issues with this project, please see [our debugging guide](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/400)**
|
||||
|
||||
First, clone the repo via git:
|
||||
|
||||
```bash
|
||||
git clone --depth 1 --single-branch --branch master https://github.com/electron-react-boilerplate/electron-react-boilerplate.git your-project-name
|
||||
```
|
||||
|
||||
And then install the dependencies with yarn.
|
||||
|
||||
```bash
|
||||
$ cd your-project-name
|
||||
$ yarn
|
||||
```
|
||||
|
||||
## Run
|
||||
|
||||
Start the app in the `dev` environment. This starts the renderer process in [**hot-module-replacement**](https://webpack.js.org/guides/hmr-react/) mode and starts a webpack dev server that sends hot updates to the renderer process:
|
||||
|
||||
```bash
|
||||
$ yarn dev
|
||||
```
|
||||
|
||||
If you don't need autofocus when your files was changed, then run `dev` with env `START_MINIMIZED=true`:
|
||||
|
||||
```bash
|
||||
$ START_MINIMIZED=true yarn dev
|
||||
```
|
||||
|
||||
## Packaging
|
||||
|
||||
To package apps for the local platform:
|
||||
|
||||
```bash
|
||||
$ yarn package
|
||||
```
|
||||
|
||||
To package apps for all platforms:
|
||||
|
||||
First, refer to the [Multi Platform Build docs](https://www.electron.build/multi-platform-build) for dependencies.
|
||||
|
||||
Then,
|
||||
|
||||
```bash
|
||||
$ yarn package-all
|
||||
```
|
||||
|
||||
To package apps with options:
|
||||
|
||||
```bash
|
||||
$ yarn package --[option]
|
||||
```
|
||||
|
||||
To run End-to-End Test
|
||||
|
||||
```bash
|
||||
$ yarn build-e2e
|
||||
$ yarn test-e2e
|
||||
|
||||
# Running e2e tests in a minimized window
|
||||
$ START_MINIMIZED=true yarn build-e2e
|
||||
$ yarn test-e2e
|
||||
```
|
||||
|
||||
:bulb: You can debug your production build with devtools by simply setting the `DEBUG_PROD` env variable:
|
||||
|
||||
```bash
|
||||
DEBUG_PROD=true yarn package
|
||||
```
|
||||
|
||||
## CSS Modules
|
||||
|
||||
This boilerplate is configured to use [css-modules](https://github.com/css-modules/css-modules) out of the box.
|
||||
|
||||
All `.css` file extensions will use css-modules unless it has `.global.css`.
|
||||
|
||||
If you need global styles, stylesheets with `.global.css` will not go through the
|
||||
css-modules loader. e.g. `app.global.css`
|
||||
|
||||
If you want to import global css libraries (like `bootstrap`), you can just write the following code in `.global.css`:
|
||||
|
||||
```css
|
||||
@import '~bootstrap/dist/css/bootstrap.css';
|
||||
```
|
||||
|
||||
## SASS support
|
||||
|
||||
If you want to use Sass in your app, you only need to import `.sass` files instead of `.css` once:
|
||||
|
||||
```js
|
||||
import './app.global.scss';
|
||||
```
|
||||
|
||||
## Static Type Checking
|
||||
|
||||
This project comes with Flow support out of the box! You can annotate your code with types, [get Flow errors as ESLint errors](https://github.com/amilajack/eslint-plugin-flowtype-errors), and get [type errors during runtime](https://github.com/codemix/flow-runtime) during development. Types are completely optional.
|
||||
|
||||
## Dispatching redux actions from main process
|
||||
|
||||
See [#118](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/118) and [#108](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/108)
|
||||
|
||||
## How to keep your project updated with the boilerplate
|
||||
|
||||
If your application is a fork from this repo, you can add this repo to another git remote:
|
||||
|
||||
```sh
|
||||
git remote add upstream https://github.com/electron-react-boilerplate/electron-react-boilerplate.git
|
||||
```
|
||||
|
||||
Then, use git to merge some latest commits:
|
||||
|
||||
```sh
|
||||
git pull upstream master
|
||||
```
|
||||
|
||||
## Maintainers
|
||||
|
||||
- [Vikram Rangaraj](https://github.com/vikr01)
|
||||
- [Amila Welihinda](https://github.com/amilajack)
|
||||
- [C. T. Lin](https://github.com/chentsulin)
|
||||
- [Jhen-Jie Hong](https://github.com/jhen0409)
|
||||
|
||||
## Backers
|
||||
|
||||
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/electron-react-boilerplate#backer)]
|
||||
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/0/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/1/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/2/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/3/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/4/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/5/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/6/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/7/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/8/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/9/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/10/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/11/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/12/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/13/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/14/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/15/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/16/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/17/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/18/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/19/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/20/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/21/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/22/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/23/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/24/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/24/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/25/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/25/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/26/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/26/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/27/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/27/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/28/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/backer/29/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/backer/29/avatar.svg"></a>
|
||||
|
||||
## Sponsors
|
||||
|
||||
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/electron-react-boilerplate#sponsor)]
|
||||
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/0/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/1/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/2/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/3/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/4/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/5/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/6/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/7/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/8/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/9/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/10/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/11/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/12/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/13/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/14/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/15/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/16/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/17/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/18/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/19/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/20/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/21/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/22/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/23/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/24/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/24/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/25/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/25/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/26/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/26/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/27/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/27/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/28/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/electron-react-boilerplate/sponsor/29/website" target="_blank"><img src="https://opencollective.com/electron-react-boilerplate/sponsor/29/avatar.svg"></a>
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Electron React Boilerplate](https://github.com/electron-react-boilerplate)
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/electron-react-boilerplate.svg?style=flat-square
|
||||
[github-tag-image]: https://img.shields.io/github/tag/electron-react-boilerplate/electron-react-boilerplate.svg
|
||||
[github-tag-url]: https://github.com/electron-react-boilerplate/electron-react-boilerplate/releases/latest
|
||||
[travis-image]: https://travis-ci.com/electron-react-boilerplate/electron-react-boilerplate.svg?branch=master
|
||||
[travis-url]: https://travis-ci.com/electron-react-boilerplate/electron-react-boilerplate
|
||||
[appveyor-image]: https://ci.appveyor.com/api/projects/status/github/electron-react-boilerplate/electron-react-boilerplate?svg=true
|
||||
[appveyor-url]: https://ci.appveyor.com/project/electron-react-boilerplate/electron-react-boilerplate/branch/master
|
||||
[david_img]: https://img.shields.io/david/electron-react-boilerplate/electron-react-boilerplate.svg
|
||||
[david_site]: https://david-dm.org/electron-react-boilerplate/electron-react-boilerplate
|
||||
[david_img_dev]: https://david-dm.org/electron-react-boilerplate/electron-react-boilerplate/dev-status.svg
|
||||
[david_site_dev]: https://david-dm.org/electron-react-boilerplate/electron-react-boilerplate?type=dev
|
15
desktop-app/app/Routes.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
import React from 'react';
|
||||
import { Switch, Route } from 'react-router';
|
||||
import routes from './constants/routes';
|
||||
import App from './containers/App';
|
||||
import HomePage from './containers/HomePage';
|
||||
import CounterPage from './containers/CounterPage';
|
||||
|
||||
export default () => (
|
||||
<App>
|
||||
<Switch>
|
||||
<Route path={routes.COUNTER} component={CounterPage} />
|
||||
<Route path={routes.HOME} component={HomePage} />
|
||||
</Switch>
|
||||
</App>
|
||||
);
|
37
desktop-app/app/actions/counter.js
Normal file
|
@ -0,0 +1,37 @@
|
|||
// @flow
|
||||
import type { GetState, Dispatch } from '../reducers/types';
|
||||
|
||||
export const INCREMENT_COUNTER = 'INCREMENT_COUNTER';
|
||||
export const DECREMENT_COUNTER = 'DECREMENT_COUNTER';
|
||||
|
||||
export function increment() {
|
||||
return {
|
||||
type: INCREMENT_COUNTER
|
||||
};
|
||||
}
|
||||
|
||||
export function decrement() {
|
||||
return {
|
||||
type: DECREMENT_COUNTER
|
||||
};
|
||||
}
|
||||
|
||||
export function incrementIfOdd() {
|
||||
return (dispatch: Dispatch, getState: GetState) => {
|
||||
const { counter } = getState();
|
||||
|
||||
if (counter % 2 === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
dispatch(increment());
|
||||
};
|
||||
}
|
||||
|
||||
export function incrementAsync(delay: number = 1000) {
|
||||
return (dispatch: Dispatch) => {
|
||||
setTimeout(() => {
|
||||
dispatch(increment());
|
||||
}, delay);
|
||||
};
|
||||
}
|
47
desktop-app/app/app.global.css
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* @NOTE: Prepend a `~` to css file paths that are in your node_modules
|
||||
* See https://github.com/webpack-contrib/sass-loader#imports
|
||||
*/
|
||||
@import "~@fortawesome/fontawesome-free/css/all.css";
|
||||
|
||||
body {
|
||||
position: relative;
|
||||
color: white;
|
||||
height: 100vh;
|
||||
/*
|
||||
background-color: #232c39;
|
||||
background-image: linear-gradient(45deg, rgba(0, 216, 255, 0.5) 10%, rgba(0, 1, 127, 0.7));
|
||||
*/
|
||||
background: #232526; /* fallback for old browsers */
|
||||
background: linear-gradient(to right, #414345, #232526);
|
||||
font-family: Arial, Helvetica, Helvetica Neue, serif;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 0;
|
||||
font-size: 2.25rem;
|
||||
font-weight: bold;
|
||||
letter-spacing: -0.025em;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
a {
|
||||
color: white;
|
||||
opacity: 0.75;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
opacity: 1;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
46
desktop-app/app/app.html
Normal file
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Hello Electron React!</title>
|
||||
<script>
|
||||
(function() {
|
||||
if (!process.env.HOT) {
|
||||
const link = document.createElement('link');
|
||||
link.rel = 'stylesheet';
|
||||
link.href = './dist/style.css';
|
||||
// HACK: Writing the script path should be done with webpack
|
||||
document.getElementsByTagName('head')[0].appendChild(link);
|
||||
}
|
||||
}());
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script>
|
||||
{
|
||||
const scripts = [];
|
||||
|
||||
// Dynamically insert the DLL script in development env in the
|
||||
// renderer process
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
scripts.push('../dll/renderer.dev.dll.js');
|
||||
}
|
||||
|
||||
// Dynamically insert the bundled app script in the renderer process
|
||||
const port = process.env.PORT || 1212;
|
||||
scripts.push(
|
||||
(process.env.HOT)
|
||||
? 'http://localhost:' + port + '/dist/renderer.dev.js'
|
||||
: './dist/renderer.prod.js'
|
||||
);
|
||||
|
||||
document.write(
|
||||
scripts
|
||||
.map(script => `<script defer src="${script}"><\/script>`)
|
||||
.join('')
|
||||
);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
BIN
desktop-app/app/app.icns
Normal file
50
desktop-app/app/components/AddressBar/index.js
Normal file
|
@ -0,0 +1,50 @@
|
|||
// @flow
|
||||
import React from 'react';
|
||||
import GoArrowIcon from '../icons/GoArrow';
|
||||
import styles from './style.css';
|
||||
|
||||
type Props = {
|
||||
address: string,
|
||||
onChange: () => void
|
||||
};
|
||||
|
||||
type State = {
|
||||
userTypedAddress: string
|
||||
};
|
||||
|
||||
class AddressBar extends React.Component<Props> {
|
||||
props: Props;
|
||||
state: State;
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
userTypedAddress: null
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className={styles.addressBarContainer}>
|
||||
<input
|
||||
type="text"
|
||||
id="name"
|
||||
name="name"
|
||||
className={styles.addressInput}
|
||||
placeholder="https://your-website.com"
|
||||
value={this.state.userTypedAddress || this.props.address}
|
||||
onChange={e => this.setState({userTypedAddress: e.target.value})}
|
||||
/>
|
||||
<button className={styles.goButton} onClick={this._onChange}>
|
||||
<GoArrowIcon height={30} color="white" />
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
_onChange = () => {
|
||||
this.props.onChange && this.props.onChange(this.state.address);
|
||||
};
|
||||
}
|
||||
|
||||
export default AddressBar;
|
24
desktop-app/app/components/AddressBar/style.css
Normal file
|
@ -0,0 +1,24 @@
|
|||
.addressBarContainer {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.addressInput {
|
||||
font-size: 16px;
|
||||
height: 20px;
|
||||
width: 200px;
|
||||
margin: 0 20px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 20px;
|
||||
background: unset;
|
||||
color: white;
|
||||
border: solid 1px white;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.goButton {
|
||||
background: unset;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
|
37
desktop-app/app/components/Counter.css
Normal file
|
@ -0,0 +1,37 @@
|
|||
.backButton {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.counter {
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
left: 45%;
|
||||
font-size: 10rem;
|
||||
font-weight: bold;
|
||||
letter-spacing: -0.025em;
|
||||
}
|
||||
|
||||
.btnGroup {
|
||||
position: relative;
|
||||
top: 500px;
|
||||
width: 480px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.btn {
|
||||
font-size: 1.6rem;
|
||||
font-weight: bold;
|
||||
background-color: #fff;
|
||||
border-radius: 50%;
|
||||
margin: 10px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
opacity: 0.7;
|
||||
cursor: pointer;
|
||||
font-family: Arial, Helvetica, Helvetica Neue, sans-serif;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
73
desktop-app/app/components/Counter.js
Normal file
|
@ -0,0 +1,73 @@
|
|||
// @flow
|
||||
import React, { Component } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import styles from './Counter.css';
|
||||
import routes from '../constants/routes';
|
||||
|
||||
type Props = {
|
||||
increment: () => void,
|
||||
incrementIfOdd: () => void,
|
||||
incrementAsync: () => void,
|
||||
decrement: () => void,
|
||||
counter: number
|
||||
};
|
||||
|
||||
export default class Counter extends Component<Props> {
|
||||
props: Props;
|
||||
|
||||
render() {
|
||||
const {
|
||||
increment,
|
||||
incrementIfOdd,
|
||||
incrementAsync,
|
||||
decrement,
|
||||
counter
|
||||
} = this.props;
|
||||
return (
|
||||
<div>
|
||||
<div className={styles.backButton} data-tid="backButton">
|
||||
<Link to={routes.HOME}>
|
||||
<i className="fa fa-arrow-left fa-3x" />
|
||||
</Link>
|
||||
</div>
|
||||
<div className={`counter ${styles.counter}`} data-tid="counter">
|
||||
{counter}
|
||||
</div>
|
||||
<div className={styles.btnGroup}>
|
||||
<button
|
||||
className={styles.btn}
|
||||
onClick={increment}
|
||||
data-tclass="btn"
|
||||
type="button"
|
||||
>
|
||||
<i className="fa fa-plus" />
|
||||
</button>
|
||||
<button
|
||||
className={styles.btn}
|
||||
onClick={decrement}
|
||||
data-tclass="btn"
|
||||
type="button"
|
||||
>
|
||||
<i className="fa fa-minus" />
|
||||
</button>
|
||||
<button
|
||||
className={styles.btn}
|
||||
onClick={incrementIfOdd}
|
||||
data-tclass="btn"
|
||||
type="button"
|
||||
>
|
||||
odd
|
||||
</button>
|
||||
<button
|
||||
className={styles.btn}
|
||||
onClick={() => incrementAsync()}
|
||||
data-tclass="btn"
|
||||
type="button"
|
||||
>
|
||||
async
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
14
desktop-app/app/components/Home.css
Normal file
|
@ -0,0 +1,14 @@
|
|||
.container {
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
left: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.container h2 {
|
||||
font-size: 5rem;
|
||||
}
|
||||
|
||||
.container a {
|
||||
font-size: 1.4rem;
|
||||
}
|
21
desktop-app/app/components/Home.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
// @flow
|
||||
import React, {Component} from 'react';
|
||||
import {Link} from 'react-router-dom';
|
||||
import AddressBar from './AddressBar';
|
||||
import routes from '../constants/routes';
|
||||
import styles from './Home.css';
|
||||
|
||||
type Props = {};
|
||||
|
||||
export default class Home extends Component<Props> {
|
||||
props: Props;
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className={styles.container} data-tid="container">
|
||||
<AddressBar address="https://www.google.com" />
|
||||
<h2>Home</h2>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
11
desktop-app/app/components/icons/GoArrow.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
import React, {Fragment} from 'react';
|
||||
|
||||
export default ({width, height, color}) => (
|
||||
<Fragment>
|
||||
<svg width={width} height={height} fill={color} version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129" xmlnsXlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 129 129">
|
||||
<g>
|
||||
<path d="m40.4,121.3c-0.8,0.8-1.8,1.2-2.9,1.2s-2.1-0.4-2.9-1.2c-1.6-1.6-1.6-4.2 0-5.8l51-51-51-51c-1.6-1.6-1.6-4.2 0-5.8 1.6-1.6 4.2-1.6 5.8,0l53.9,53.9c1.6,1.6 1.6,4.2 0,5.8l-53.9,53.9z"/>
|
||||
</g>
|
||||
</svg>
|
||||
</Fragment>
|
||||
);
|
4
desktop-app/app/constants/routes.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"HOME": "/",
|
||||
"COUNTER": "/counter"
|
||||
}
|
15
desktop-app/app/containers/App.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
// @flow
|
||||
import * as React from 'react';
|
||||
|
||||
type Props = {
|
||||
children: React.Node
|
||||
};
|
||||
|
||||
export default class App extends React.Component<Props> {
|
||||
props: Props;
|
||||
|
||||
render() {
|
||||
const { children } = this.props;
|
||||
return <React.Fragment>{children}</React.Fragment>;
|
||||
}
|
||||
}
|
19
desktop-app/app/containers/CounterPage.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
import Counter from '../components/Counter';
|
||||
import * as CounterActions from '../actions/counter';
|
||||
|
||||
function mapStateToProps(state) {
|
||||
return {
|
||||
counter: state.counter
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
return bindActionCreators(CounterActions, dispatch);
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(Counter);
|
13
desktop-app/app/containers/HomePage.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
// @flow
|
||||
import React, { Component } from 'react';
|
||||
import Home from '../components/Home';
|
||||
|
||||
type Props = {};
|
||||
|
||||
export default class HomePage extends Component<Props> {
|
||||
props: Props;
|
||||
|
||||
render() {
|
||||
return <Home />;
|
||||
}
|
||||
}
|
24
desktop-app/app/containers/Root.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
// @flow
|
||||
import React, { Component } from 'react';
|
||||
import { Provider } from 'react-redux';
|
||||
import { ConnectedRouter } from 'connected-react-router';
|
||||
import type { Store } from '../reducers/types';
|
||||
import Routes from '../Routes';
|
||||
|
||||
type Props = {
|
||||
store: Store,
|
||||
history: {}
|
||||
};
|
||||
|
||||
export default class Root extends Component<Props> {
|
||||
render() {
|
||||
const { store, history } = this.props;
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<ConnectedRouter history={history}>
|
||||
<Routes />
|
||||
</ConnectedRouter>
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
}
|
6
desktop-app/app/go-arrow.svg
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 129 129">
|
||||
<g>
|
||||
<path d="m40.4,121.3c-0.8,0.8-1.8,1.2-2.9,1.2s-2.1-0.4-2.9-1.2c-1.6-1.6-1.6-4.2 0-5.8l51-51-51-51c-1.6-1.6-1.6-4.2 0-5.8 1.6-1.6 4.2-1.6 5.8,0l53.9,53.9c1.6,1.6 1.6,4.2 0,5.8l-53.9,53.9z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 409 B |
28
desktop-app/app/index.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
import React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import { AppContainer } from 'react-hot-loader';
|
||||
import Root from './containers/Root';
|
||||
import { configureStore, history } from './store/configureStore';
|
||||
import './app.global.css';
|
||||
|
||||
const store = configureStore();
|
||||
|
||||
render(
|
||||
<AppContainer>
|
||||
<Root store={store} history={history} />
|
||||
</AppContainer>,
|
||||
document.getElementById('root')
|
||||
);
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept('./containers/Root', () => {
|
||||
// eslint-disable-next-line global-require
|
||||
const NextRoot = require('./containers/Root').default;
|
||||
render(
|
||||
<AppContainer>
|
||||
<NextRoot store={store} history={history} />
|
||||
</AppContainer>,
|
||||
document.getElementById('root')
|
||||
);
|
||||
});
|
||||
}
|
102
desktop-app/app/main.dev.js
Normal file
|
@ -0,0 +1,102 @@
|
|||
/* eslint global-require: off */
|
||||
|
||||
/**
|
||||
* This module executes inside of electron's main process. You can start
|
||||
* electron renderer process from here and communicate with the other processes
|
||||
* through IPC.
|
||||
*
|
||||
* When running `yarn build` or `yarn build-main`, this file is compiled to
|
||||
* `./app/main.prod.js` using webpack. This gives us some performance wins.
|
||||
*
|
||||
* @flow
|
||||
*/
|
||||
import { app, BrowserWindow } from 'electron';
|
||||
import { autoUpdater } from 'electron-updater';
|
||||
import log from 'electron-log';
|
||||
import MenuBuilder from './menu';
|
||||
|
||||
export default class AppUpdater {
|
||||
constructor() {
|
||||
log.transports.file.level = 'info';
|
||||
autoUpdater.logger = log;
|
||||
autoUpdater.checkForUpdatesAndNotify();
|
||||
}
|
||||
}
|
||||
|
||||
let mainWindow = null;
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
const sourceMapSupport = require('source-map-support');
|
||||
sourceMapSupport.install();
|
||||
}
|
||||
|
||||
if (
|
||||
process.env.NODE_ENV === 'development' ||
|
||||
process.env.DEBUG_PROD === 'true'
|
||||
) {
|
||||
require('electron-debug')();
|
||||
}
|
||||
|
||||
const installExtensions = async () => {
|
||||
const installer = require('electron-devtools-installer');
|
||||
const forceDownload = !!process.env.UPGRADE_EXTENSIONS;
|
||||
const extensions = ['REACT_DEVELOPER_TOOLS', 'REDUX_DEVTOOLS'];
|
||||
|
||||
return Promise.all(
|
||||
extensions.map(name => installer.default(installer[name], forceDownload))
|
||||
).catch(console.log);
|
||||
};
|
||||
|
||||
/**
|
||||
* Add event listeners...
|
||||
*/
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
// Respect the OSX convention of having the application in memory even
|
||||
// after all windows have been closed
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
|
||||
app.on('ready', async () => {
|
||||
if (
|
||||
process.env.NODE_ENV === 'development' ||
|
||||
process.env.DEBUG_PROD === 'true'
|
||||
) {
|
||||
await installExtensions();
|
||||
}
|
||||
|
||||
mainWindow = new BrowserWindow({
|
||||
show: false,
|
||||
width: 1024,
|
||||
height: 728
|
||||
});
|
||||
|
||||
mainWindow.loadURL(`file://${__dirname}/app.html`);
|
||||
|
||||
// @TODO: Use 'ready-to-show' event
|
||||
// https://github.com/electron/electron/blob/master/docs/api/browser-window.md#using-ready-to-show-event
|
||||
mainWindow.webContents.on('did-finish-load', () => {
|
||||
if (!mainWindow) {
|
||||
throw new Error('"mainWindow" is not defined');
|
||||
}
|
||||
if (process.env.START_MINIMIZED) {
|
||||
mainWindow.minimize();
|
||||
} else {
|
||||
mainWindow.show();
|
||||
mainWindow.focus();
|
||||
}
|
||||
});
|
||||
|
||||
mainWindow.on('closed', () => {
|
||||
mainWindow = null;
|
||||
});
|
||||
|
||||
const menuBuilder = new MenuBuilder(mainWindow);
|
||||
menuBuilder.buildMenu();
|
||||
|
||||
// Remove this if your app does not use auto updates
|
||||
// eslint-disable-next-line
|
||||
new AppUpdater();
|
||||
});
|
277
desktop-app/app/menu.js
Normal file
|
@ -0,0 +1,277 @@
|
|||
// @flow
|
||||
import { app, Menu, shell, BrowserWindow } from 'electron';
|
||||
|
||||
export default class MenuBuilder {
|
||||
mainWindow: BrowserWindow;
|
||||
|
||||
constructor(mainWindow: BrowserWindow) {
|
||||
this.mainWindow = mainWindow;
|
||||
}
|
||||
|
||||
buildMenu() {
|
||||
if (
|
||||
process.env.NODE_ENV === 'development' ||
|
||||
process.env.DEBUG_PROD === 'true'
|
||||
) {
|
||||
this.setupDevelopmentEnvironment();
|
||||
}
|
||||
|
||||
const template =
|
||||
process.platform === 'darwin'
|
||||
? this.buildDarwinTemplate()
|
||||
: this.buildDefaultTemplate();
|
||||
|
||||
const menu = Menu.buildFromTemplate(template);
|
||||
Menu.setApplicationMenu(menu);
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
setupDevelopmentEnvironment() {
|
||||
this.mainWindow.openDevTools();
|
||||
this.mainWindow.webContents.on('context-menu', (e, props) => {
|
||||
const { x, y } = props;
|
||||
|
||||
Menu.buildFromTemplate([
|
||||
{
|
||||
label: 'Inspect element',
|
||||
click: () => {
|
||||
this.mainWindow.inspectElement(x, y);
|
||||
}
|
||||
}
|
||||
]).popup(this.mainWindow);
|
||||
});
|
||||
}
|
||||
|
||||
buildDarwinTemplate() {
|
||||
const subMenuAbout = {
|
||||
label: 'Electron',
|
||||
submenu: [
|
||||
{
|
||||
label: 'About ElectronReact',
|
||||
selector: 'orderFrontStandardAboutPanel:'
|
||||
},
|
||||
{ type: 'separator' },
|
||||
{ label: 'Services', submenu: [] },
|
||||
{ type: 'separator' },
|
||||
{
|
||||
label: 'Hide ElectronReact',
|
||||
accelerator: 'Command+H',
|
||||
selector: 'hide:'
|
||||
},
|
||||
{
|
||||
label: 'Hide Others',
|
||||
accelerator: 'Command+Shift+H',
|
||||
selector: 'hideOtherApplications:'
|
||||
},
|
||||
{ label: 'Show All', selector: 'unhideAllApplications:' },
|
||||
{ type: 'separator' },
|
||||
{
|
||||
label: 'Quit',
|
||||
accelerator: 'Command+Q',
|
||||
click: () => {
|
||||
app.quit();
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const subMenuEdit = {
|
||||
label: 'Edit',
|
||||
submenu: [
|
||||
{ label: 'Undo', accelerator: 'Command+Z', selector: 'undo:' },
|
||||
{ label: 'Redo', accelerator: 'Shift+Command+Z', selector: 'redo:' },
|
||||
{ type: 'separator' },
|
||||
{ label: 'Cut', accelerator: 'Command+X', selector: 'cut:' },
|
||||
{ label: 'Copy', accelerator: 'Command+C', selector: 'copy:' },
|
||||
{ label: 'Paste', accelerator: 'Command+V', selector: 'paste:' },
|
||||
{
|
||||
label: 'Select All',
|
||||
accelerator: 'Command+A',
|
||||
selector: 'selectAll:'
|
||||
}
|
||||
]
|
||||
};
|
||||
const subMenuViewDev = {
|
||||
label: 'View',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Reload',
|
||||
accelerator: 'Command+R',
|
||||
click: () => {
|
||||
this.mainWindow.webContents.reload();
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Toggle Full Screen',
|
||||
accelerator: 'Ctrl+Command+F',
|
||||
click: () => {
|
||||
this.mainWindow.setFullScreen(!this.mainWindow.isFullScreen());
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Toggle Developer Tools',
|
||||
accelerator: 'Alt+Command+I',
|
||||
click: () => {
|
||||
this.mainWindow.toggleDevTools();
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const subMenuViewProd = {
|
||||
label: 'View',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Toggle Full Screen',
|
||||
accelerator: 'Ctrl+Command+F',
|
||||
click: () => {
|
||||
this.mainWindow.setFullScreen(!this.mainWindow.isFullScreen());
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const subMenuWindow = {
|
||||
label: 'Window',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Minimize',
|
||||
accelerator: 'Command+M',
|
||||
selector: 'performMiniaturize:'
|
||||
},
|
||||
{ label: 'Close', accelerator: 'Command+W', selector: 'performClose:' },
|
||||
{ type: 'separator' },
|
||||
{ label: 'Bring All to Front', selector: 'arrangeInFront:' }
|
||||
]
|
||||
};
|
||||
const subMenuHelp = {
|
||||
label: 'Help',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Learn More',
|
||||
click() {
|
||||
shell.openExternal('http://electron.atom.io');
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Documentation',
|
||||
click() {
|
||||
shell.openExternal(
|
||||
'https://github.com/atom/electron/tree/master/docs#readme'
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Community Discussions',
|
||||
click() {
|
||||
shell.openExternal('https://discuss.atom.io/c/electron');
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Search Issues',
|
||||
click() {
|
||||
shell.openExternal('https://github.com/atom/electron/issues');
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
const subMenuView =
|
||||
process.env.NODE_ENV === 'development' ? subMenuViewDev : subMenuViewProd;
|
||||
|
||||
return [subMenuAbout, subMenuEdit, subMenuView, subMenuWindow, subMenuHelp];
|
||||
}
|
||||
|
||||
buildDefaultTemplate() {
|
||||
const templateDefault = [
|
||||
{
|
||||
label: '&File',
|
||||
submenu: [
|
||||
{
|
||||
label: '&Open',
|
||||
accelerator: 'Ctrl+O'
|
||||
},
|
||||
{
|
||||
label: '&Close',
|
||||
accelerator: 'Ctrl+W',
|
||||
click: () => {
|
||||
this.mainWindow.close();
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '&View',
|
||||
submenu:
|
||||
process.env.NODE_ENV === 'development'
|
||||
? [
|
||||
{
|
||||
label: '&Reload',
|
||||
accelerator: 'Ctrl+R',
|
||||
click: () => {
|
||||
this.mainWindow.webContents.reload();
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Toggle &Full Screen',
|
||||
accelerator: 'F11',
|
||||
click: () => {
|
||||
this.mainWindow.setFullScreen(
|
||||
!this.mainWindow.isFullScreen()
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Toggle &Developer Tools',
|
||||
accelerator: 'Alt+Ctrl+I',
|
||||
click: () => {
|
||||
this.mainWindow.toggleDevTools();
|
||||
}
|
||||
}
|
||||
]
|
||||
: [
|
||||
{
|
||||
label: 'Toggle &Full Screen',
|
||||
accelerator: 'F11',
|
||||
click: () => {
|
||||
this.mainWindow.setFullScreen(
|
||||
!this.mainWindow.isFullScreen()
|
||||
);
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Help',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Learn More',
|
||||
click() {
|
||||
shell.openExternal('http://electron.atom.io');
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Documentation',
|
||||
click() {
|
||||
shell.openExternal(
|
||||
'https://github.com/atom/electron/tree/master/docs#readme'
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Community Discussions',
|
||||
click() {
|
||||
shell.openExternal('https://discuss.atom.io/c/electron');
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Search Issues',
|
||||
click() {
|
||||
shell.openExternal('https://github.com/atom/electron/issues');
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
return templateDefault;
|
||||
}
|
||||
}
|
14
desktop-app/app/reducers/counter.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
// @flow
|
||||
import { INCREMENT_COUNTER, DECREMENT_COUNTER } from '../actions/counter';
|
||||
import type { Action } from './types';
|
||||
|
||||
export default function counter(state: number = 0, action: Action) {
|
||||
switch (action.type) {
|
||||
case INCREMENT_COUNTER:
|
||||
return state + 1;
|
||||
case DECREMENT_COUNTER:
|
||||
return state - 1;
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
11
desktop-app/app/reducers/index.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
// @flow
|
||||
import { combineReducers } from 'redux';
|
||||
import { connectRouter } from 'connected-react-router';
|
||||
import counter from './counter';
|
||||
|
||||
export default function createRootReducer(history: History) {
|
||||
return combineReducers({
|
||||
router: connectRouter(history),
|
||||
counter
|
||||
});
|
||||
}
|
15
desktop-app/app/reducers/types.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
import type { Dispatch as ReduxDispatch, Store as ReduxStore } from 'redux';
|
||||
|
||||
export type counterStateType = {
|
||||
+counter: number
|
||||
};
|
||||
|
||||
export type Action = {
|
||||
+type: string
|
||||
};
|
||||
|
||||
export type GetState = () => counterStateType;
|
||||
|
||||
export type Dispatch = ReduxDispatch<Action>;
|
||||
|
||||
export type Store = ReduxStore<GetState, Action>;
|
70
desktop-app/app/store/configureStore.dev.js
Normal file
|
@ -0,0 +1,70 @@
|
|||
import { createStore, applyMiddleware, compose } from 'redux';
|
||||
import thunk from 'redux-thunk';
|
||||
import { createHashHistory } from 'history';
|
||||
import { routerMiddleware, routerActions } from 'connected-react-router';
|
||||
import { createLogger } from 'redux-logger';
|
||||
import createRootReducer from '../reducers';
|
||||
import * as counterActions from '../actions/counter';
|
||||
import type { counterStateType } from '../reducers/types';
|
||||
|
||||
const history = createHashHistory();
|
||||
|
||||
const rootReducer = createRootReducer(history);
|
||||
|
||||
const configureStore = (initialState?: counterStateType) => {
|
||||
// Redux Configuration
|
||||
const middleware = [];
|
||||
const enhancers = [];
|
||||
|
||||
// Thunk Middleware
|
||||
middleware.push(thunk);
|
||||
|
||||
// Logging Middleware
|
||||
const logger = createLogger({
|
||||
level: 'info',
|
||||
collapsed: true
|
||||
});
|
||||
|
||||
// Skip redux logs in console during the tests
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
middleware.push(logger);
|
||||
}
|
||||
|
||||
// Router Middleware
|
||||
const router = routerMiddleware(history);
|
||||
middleware.push(router);
|
||||
|
||||
// Redux DevTools Configuration
|
||||
const actionCreators = {
|
||||
...counterActions,
|
||||
...routerActions
|
||||
};
|
||||
// If Redux DevTools Extension is installed use it, otherwise use Redux compose
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
|
||||
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
|
||||
// Options: http://extension.remotedev.io/docs/API/Arguments.html
|
||||
actionCreators
|
||||
})
|
||||
: compose;
|
||||
/* eslint-enable no-underscore-dangle */
|
||||
|
||||
// Apply Middleware & Compose Enhancers
|
||||
enhancers.push(applyMiddleware(...middleware));
|
||||
const enhancer = composeEnhancers(...enhancers);
|
||||
|
||||
// Create Store
|
||||
const store = createStore(rootReducer, initialState, enhancer);
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept(
|
||||
'../reducers',
|
||||
// eslint-disable-next-line global-require
|
||||
() => store.replaceReducer(require('../reducers').default)
|
||||
);
|
||||
}
|
||||
|
||||
return store;
|
||||
};
|
||||
|
||||
export default { configureStore, history };
|
12
desktop-app/app/store/configureStore.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
// @flow
|
||||
import configureStoreDev from './configureStore.dev';
|
||||
import configureStoreProd from './configureStore.prod';
|
||||
|
||||
const selectedConfigureStore =
|
||||
process.env.NODE_ENV === 'production'
|
||||
? configureStoreProd
|
||||
: configureStoreDev;
|
||||
|
||||
export const { configureStore } = selectedConfigureStore;
|
||||
|
||||
export const { history } = selectedConfigureStore;
|
18
desktop-app/app/store/configureStore.prod.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// @flow
|
||||
import { createStore, applyMiddleware } from 'redux';
|
||||
import thunk from 'redux-thunk';
|
||||
import { createHashHistory } from 'history';
|
||||
import { routerMiddleware } from 'connected-react-router';
|
||||
import createRootReducer from '../reducers';
|
||||
import type { counterStateType } from '../reducers/types';
|
||||
|
||||
const history = createHashHistory();
|
||||
const rootReducer = createRootReducer(history);
|
||||
const router = routerMiddleware(history);
|
||||
const enhancer = applyMiddleware(thunk, router);
|
||||
|
||||
function configureStore(initialState?: counterStateType) {
|
||||
return createStore(rootReducer, initialState, enhancer);
|
||||
}
|
||||
|
||||
export default { configureStore, history };
|
0
desktop-app/app/utils/.gitkeep
Normal file
38
desktop-app/appveyor.yml
Normal file
|
@ -0,0 +1,38 @@
|
|||
image: Visual Studio 2017
|
||||
|
||||
platform:
|
||||
- x64
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- nodejs_version: 10
|
||||
|
||||
cache:
|
||||
- '%LOCALAPPDATA%/Yarn'
|
||||
- node_modules
|
||||
- flow-typed
|
||||
- '%USERPROFILE%\.electron'
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
build: off
|
||||
|
||||
version: '{build}'
|
||||
|
||||
shallow_clone: true
|
||||
|
||||
clone_depth: 1
|
||||
|
||||
install:
|
||||
- ps: Install-Product node $env:nodejs_version x64
|
||||
- set CI=true
|
||||
- yarn
|
||||
|
||||
test_script:
|
||||
- yarn package-ci
|
||||
- yarn lint
|
||||
# - yarn flow
|
||||
- yarn test
|
||||
- yarn build-e2e
|
||||
- yarn test-e2e
|
67
desktop-app/babel.config.js
Normal file
|
@ -0,0 +1,67 @@
|
|||
/* eslint global-require: off */
|
||||
|
||||
const developmentEnvironments = ['development', 'test'];
|
||||
|
||||
const developmentPlugins = [require('react-hot-loader/babel')];
|
||||
|
||||
const productionPlugins = [
|
||||
require('babel-plugin-dev-expression'),
|
||||
|
||||
// babel-preset-react-optimize
|
||||
require('@babel/plugin-transform-react-constant-elements'),
|
||||
require('@babel/plugin-transform-react-inline-elements'),
|
||||
require('babel-plugin-transform-react-remove-prop-types')
|
||||
];
|
||||
|
||||
module.exports = api => {
|
||||
// see docs about api at https://babeljs.io/docs/en/config-files#apicache
|
||||
|
||||
const development = api.env(developmentEnvironments);
|
||||
|
||||
return {
|
||||
presets: [
|
||||
[
|
||||
require('@babel/preset-env'),
|
||||
{
|
||||
targets: { electron: require('electron/package.json').version },
|
||||
useBuiltIns: 'usage'
|
||||
}
|
||||
],
|
||||
require('@babel/preset-flow'),
|
||||
[require('@babel/preset-react'), { development }]
|
||||
],
|
||||
plugins: [
|
||||
// Stage 0
|
||||
require('@babel/plugin-proposal-function-bind'),
|
||||
|
||||
// Stage 1
|
||||
require('@babel/plugin-proposal-export-default-from'),
|
||||
require('@babel/plugin-proposal-logical-assignment-operators'),
|
||||
[require('@babel/plugin-proposal-optional-chaining'), { loose: false }],
|
||||
[
|
||||
require('@babel/plugin-proposal-pipeline-operator'),
|
||||
{ proposal: 'minimal' }
|
||||
],
|
||||
[
|
||||
require('@babel/plugin-proposal-nullish-coalescing-operator'),
|
||||
{ loose: false }
|
||||
],
|
||||
require('@babel/plugin-proposal-do-expressions'),
|
||||
|
||||
// Stage 2
|
||||
[require('@babel/plugin-proposal-decorators'), { legacy: true }],
|
||||
require('@babel/plugin-proposal-function-sent'),
|
||||
require('@babel/plugin-proposal-export-namespace-from'),
|
||||
require('@babel/plugin-proposal-numeric-separator'),
|
||||
require('@babel/plugin-proposal-throw-expressions'),
|
||||
|
||||
// Stage 3
|
||||
require('@babel/plugin-syntax-dynamic-import'),
|
||||
require('@babel/plugin-syntax-import-meta'),
|
||||
[require('@babel/plugin-proposal-class-properties'), { loose: true }],
|
||||
require('@babel/plugin-proposal-json-strings'),
|
||||
|
||||
...(development ? developmentPlugins : productionPlugins)
|
||||
]
|
||||
};
|
||||
};
|
47
desktop-app/configs/webpack.config.base.js
Normal file
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* Base webpack config used across other specific configs
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import webpack from 'webpack';
|
||||
import { dependencies } from '../package.json';
|
||||
|
||||
export default {
|
||||
externals: [...Object.keys(dependencies || {})],
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
cacheDirectory: true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
output: {
|
||||
path: path.join(__dirname, '..', 'app'),
|
||||
// https://github.com/webpack/webpack/issues/1114
|
||||
libraryTarget: 'commonjs2'
|
||||
},
|
||||
|
||||
/**
|
||||
* Determine the array of extensions that should be used to resolve modules.
|
||||
*/
|
||||
resolve: {
|
||||
extensions: ['.js', '.jsx', '.json']
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: 'production'
|
||||
}),
|
||||
|
||||
new webpack.NamedModulesPlugin()
|
||||
]
|
||||
};
|
4
desktop-app/configs/webpack.config.eslint.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
/* eslint import/no-unresolved: off, import/no-self-import: off */
|
||||
require('@babel/register');
|
||||
|
||||
module.exports = require('./webpack.config.renderer.dev.babel').default;
|
73
desktop-app/configs/webpack.config.main.prod.babel.js
Normal file
|
@ -0,0 +1,73 @@
|
|||
/**
|
||||
* Webpack config for production electron main process
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import webpack from 'webpack';
|
||||
import merge from 'webpack-merge';
|
||||
import TerserPlugin from 'terser-webpack-plugin';
|
||||
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
||||
import baseConfig from './webpack.config.base';
|
||||
import CheckNodeEnv from '../internals/scripts/CheckNodeEnv';
|
||||
|
||||
CheckNodeEnv('production');
|
||||
|
||||
export default merge.smart(baseConfig, {
|
||||
devtool: 'source-map',
|
||||
|
||||
mode: 'production',
|
||||
|
||||
target: 'electron-main',
|
||||
|
||||
entry: './app/main.dev',
|
||||
|
||||
output: {
|
||||
path: path.join(__dirname, '..'),
|
||||
filename: './app/main.prod.js'
|
||||
},
|
||||
|
||||
optimization: {
|
||||
minimizer: process.env.E2E_BUILD
|
||||
? []
|
||||
: [
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
sourceMap: true,
|
||||
cache: true
|
||||
})
|
||||
]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerMode:
|
||||
process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
|
||||
openAnalyzer: process.env.OPEN_ANALYZER === 'true'
|
||||
}),
|
||||
|
||||
/**
|
||||
* Create global constants which can be configured at compile time.
|
||||
*
|
||||
* Useful for allowing different behaviour between development builds and
|
||||
* release builds
|
||||
*
|
||||
* NODE_ENV should be production so that modules do not perform certain
|
||||
* development checks
|
||||
*/
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: 'production',
|
||||
DEBUG_PROD: false,
|
||||
START_MINIMIZED: false
|
||||
})
|
||||
],
|
||||
|
||||
/**
|
||||
* Disables webpack processing of __dirname and __filename.
|
||||
* If you run the bundle in node.js it falls back to these values of node.js.
|
||||
* https://github.com/webpack/webpack/issues/2010
|
||||
*/
|
||||
node: {
|
||||
__dirname: false,
|
||||
__filename: false
|
||||
}
|
||||
});
|
273
desktop-app/configs/webpack.config.renderer.dev.babel.js
Normal file
|
@ -0,0 +1,273 @@
|
|||
/* eslint global-require: off, import/no-dynamic-require: off */
|
||||
|
||||
/**
|
||||
* Build config for development electron renderer process that uses
|
||||
* Hot-Module-Replacement
|
||||
*
|
||||
* https://webpack.js.org/concepts/hot-module-replacement/
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import webpack from 'webpack';
|
||||
import chalk from 'chalk';
|
||||
import merge from 'webpack-merge';
|
||||
import { spawn, execSync } from 'child_process';
|
||||
import baseConfig from './webpack.config.base';
|
||||
import CheckNodeEnv from '../internals/scripts/CheckNodeEnv';
|
||||
|
||||
CheckNodeEnv('development');
|
||||
|
||||
const port = process.env.PORT || 1212;
|
||||
const publicPath = `http://localhost:${port}/dist`;
|
||||
const dll = path.join(__dirname, '..', 'dll');
|
||||
const manifest = path.resolve(dll, 'renderer.json');
|
||||
const requiredByDLLConfig = module.parent.filename.includes(
|
||||
'webpack.config.renderer.dev.dll'
|
||||
);
|
||||
|
||||
/**
|
||||
* Warn if the DLL is not built
|
||||
*/
|
||||
if (!requiredByDLLConfig && !(fs.existsSync(dll) && fs.existsSync(manifest))) {
|
||||
console.log(
|
||||
chalk.black.bgYellow.bold(
|
||||
'The DLL files are missing. Sit back while we build them for you with "yarn build-dll"'
|
||||
)
|
||||
);
|
||||
execSync('yarn build-dll');
|
||||
}
|
||||
|
||||
export default merge.smart(baseConfig, {
|
||||
devtool: 'inline-source-map',
|
||||
|
||||
mode: 'development',
|
||||
|
||||
target: 'electron-renderer',
|
||||
|
||||
entry: [
|
||||
'react-hot-loader/patch',
|
||||
`webpack-dev-server/client?http://localhost:${port}/`,
|
||||
'webpack/hot/only-dev-server',
|
||||
require.resolve('../app/index')
|
||||
],
|
||||
|
||||
output: {
|
||||
publicPath: `http://localhost:${port}/dist/`,
|
||||
filename: 'renderer.dev.js'
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
cacheDirectory: true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.global\.css$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'style-loader'
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /^((?!\.global).)*\.css$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'style-loader'
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
modules: true,
|
||||
sourceMap: true,
|
||||
importLoaders: 1,
|
||||
localIdentName: '[local]__[hash:base64:5]'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// SASS support - compile all .global.scss files and pipe it to style.css
|
||||
{
|
||||
test: /\.global\.(scss|sass)$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'style-loader'
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: true
|
||||
}
|
||||
},
|
||||
{
|
||||
loader: 'sass-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
// SASS support - compile all other .scss files and pipe it to style.css
|
||||
{
|
||||
test: /^((?!\.global).)*\.(scss|sass)$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'style-loader'
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
modules: true,
|
||||
sourceMap: true,
|
||||
importLoaders: 1,
|
||||
localIdentName: '[local]__[hash:base64:5]'
|
||||
}
|
||||
},
|
||||
{
|
||||
loader: 'sass-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
// WOFF Font
|
||||
{
|
||||
test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
|
||||
use: {
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
mimetype: 'application/font-woff'
|
||||
}
|
||||
}
|
||||
},
|
||||
// WOFF2 Font
|
||||
{
|
||||
test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/,
|
||||
use: {
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
mimetype: 'application/font-woff'
|
||||
}
|
||||
}
|
||||
},
|
||||
// TTF Font
|
||||
{
|
||||
test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
|
||||
use: {
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
mimetype: 'application/octet-stream'
|
||||
}
|
||||
}
|
||||
},
|
||||
// EOT Font
|
||||
{
|
||||
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
|
||||
use: 'file-loader'
|
||||
},
|
||||
// SVG Font
|
||||
{
|
||||
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
|
||||
use: {
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
mimetype: 'image/svg+xml'
|
||||
}
|
||||
}
|
||||
},
|
||||
// Common Image Formats
|
||||
{
|
||||
test: /\.(?:ico|gif|png|jpg|jpeg|webp)$/,
|
||||
use: 'url-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
requiredByDLLConfig
|
||||
? null
|
||||
: new webpack.DllReferencePlugin({
|
||||
context: path.join(__dirname, '..', 'dll'),
|
||||
manifest: require(manifest),
|
||||
sourceType: 'var'
|
||||
}),
|
||||
|
||||
new webpack.HotModuleReplacementPlugin({
|
||||
multiStep: true
|
||||
}),
|
||||
|
||||
new webpack.NoEmitOnErrorsPlugin(),
|
||||
|
||||
/**
|
||||
* Create global constants which can be configured at compile time.
|
||||
*
|
||||
* Useful for allowing different behaviour between development builds and
|
||||
* release builds
|
||||
*
|
||||
* NODE_ENV should be production so that modules do not perform certain
|
||||
* development checks
|
||||
*
|
||||
* By default, use 'development' as NODE_ENV. This can be overriden with
|
||||
* 'staging', for example, by changing the ENV variables in the npm scripts
|
||||
*/
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: 'development'
|
||||
}),
|
||||
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
debug: true
|
||||
})
|
||||
],
|
||||
|
||||
node: {
|
||||
__dirname: false,
|
||||
__filename: false
|
||||
},
|
||||
|
||||
devServer: {
|
||||
port,
|
||||
publicPath,
|
||||
compress: true,
|
||||
noInfo: true,
|
||||
stats: 'errors-only',
|
||||
inline: true,
|
||||
lazy: false,
|
||||
hot: true,
|
||||
headers: { 'Access-Control-Allow-Origin': '*' },
|
||||
contentBase: path.join(__dirname, 'dist'),
|
||||
watchOptions: {
|
||||
aggregateTimeout: 300,
|
||||
ignored: /node_modules/,
|
||||
poll: 100
|
||||
},
|
||||
historyApiFallback: {
|
||||
verbose: true,
|
||||
disableDotRule: false
|
||||
},
|
||||
before() {
|
||||
if (process.env.START_HOT) {
|
||||
console.log('Starting Main Process...');
|
||||
spawn('npm', ['run', 'start-main-dev'], {
|
||||
shell: true,
|
||||
env: process.env,
|
||||
stdio: 'inherit'
|
||||
})
|
||||
.on('close', code => process.exit(code))
|
||||
.on('error', spawnError => console.error(spawnError));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
74
desktop-app/configs/webpack.config.renderer.dev.dll.babel.js
Normal file
|
@ -0,0 +1,74 @@
|
|||
/* eslint global-require: off, import/no-dynamic-require: off */
|
||||
|
||||
/**
|
||||
* Builds the DLL for development electron renderer process
|
||||
*/
|
||||
|
||||
import webpack from 'webpack';
|
||||
import path from 'path';
|
||||
import merge from 'webpack-merge';
|
||||
import baseConfig from './webpack.config.base';
|
||||
import { dependencies } from '../package.json';
|
||||
import CheckNodeEnv from '../internals/scripts/CheckNodeEnv';
|
||||
|
||||
CheckNodeEnv('development');
|
||||
|
||||
const dist = path.join(__dirname, '..', 'dll');
|
||||
|
||||
export default merge.smart(baseConfig, {
|
||||
context: path.join(__dirname, '..'),
|
||||
|
||||
devtool: 'eval',
|
||||
|
||||
mode: 'development',
|
||||
|
||||
target: 'electron-renderer',
|
||||
|
||||
externals: ['fsevents', 'crypto-browserify'],
|
||||
|
||||
/**
|
||||
* Use `module` from `webpack.config.renderer.dev.js`
|
||||
*/
|
||||
module: require('./webpack.config.renderer.dev.babel').default.module,
|
||||
|
||||
entry: {
|
||||
renderer: Object.keys(dependencies || {})
|
||||
},
|
||||
|
||||
output: {
|
||||
library: 'renderer',
|
||||
path: dist,
|
||||
filename: '[name].dev.dll.js',
|
||||
libraryTarget: 'var'
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.DllPlugin({
|
||||
path: path.join(dist, '[name].json'),
|
||||
name: '[name]'
|
||||
}),
|
||||
|
||||
/**
|
||||
* Create global constants which can be configured at compile time.
|
||||
*
|
||||
* Useful for allowing different behaviour between development builds and
|
||||
* release builds
|
||||
*
|
||||
* NODE_ENV should be production so that modules do not perform certain
|
||||
* development checks
|
||||
*/
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: 'development'
|
||||
}),
|
||||
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
debug: true,
|
||||
options: {
|
||||
context: path.join(__dirname, '..', 'app'),
|
||||
output: {
|
||||
path: path.join(__dirname, '..', 'dll')
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
});
|
215
desktop-app/configs/webpack.config.renderer.prod.babel.js
Normal file
|
@ -0,0 +1,215 @@
|
|||
/**
|
||||
* Build config for electron renderer process
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import webpack from 'webpack';
|
||||
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
||||
import OptimizeCSSAssetsPlugin from 'optimize-css-assets-webpack-plugin';
|
||||
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
||||
import merge from 'webpack-merge';
|
||||
import TerserPlugin from 'terser-webpack-plugin';
|
||||
import baseConfig from './webpack.config.base';
|
||||
import CheckNodeEnv from '../internals/scripts/CheckNodeEnv';
|
||||
|
||||
CheckNodeEnv('production');
|
||||
export default merge.smart(baseConfig, {
|
||||
devtool: 'source-map',
|
||||
|
||||
mode: 'production',
|
||||
|
||||
target: 'electron-renderer',
|
||||
|
||||
entry: path.join(__dirname, '..', 'app/index'),
|
||||
|
||||
output: {
|
||||
path: path.join(__dirname, '..', 'app/dist'),
|
||||
publicPath: './dist/',
|
||||
filename: 'renderer.prod.js'
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
// Extract all .global.css to style.css as is
|
||||
{
|
||||
test: /\.global\.css$/,
|
||||
use: [
|
||||
{
|
||||
loader: MiniCssExtractPlugin.loader,
|
||||
options: {
|
||||
publicPath: './'
|
||||
}
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Pipe other styles through css modules and append to style.css
|
||||
{
|
||||
test: /^((?!\.global).)*\.css$/,
|
||||
use: [
|
||||
{
|
||||
loader: MiniCssExtractPlugin.loader
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
modules: true,
|
||||
localIdentName: '[name]__[local]__[hash:base64:5]',
|
||||
sourceMap: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Add SASS support - compile all .global.scss files and pipe it to style.css
|
||||
{
|
||||
test: /\.global\.(scss|sass)$/,
|
||||
use: [
|
||||
{
|
||||
loader: MiniCssExtractPlugin.loader
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
importLoaders: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
sourceMap: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Add SASS support - compile all other .scss files and pipe it to style.css
|
||||
{
|
||||
test: /^((?!\.global).)*\.(scss|sass)$/,
|
||||
use: [
|
||||
{
|
||||
loader: MiniCssExtractPlugin.loader
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
modules: true,
|
||||
importLoaders: 1,
|
||||
localIdentName: '[name]__[local]__[hash:base64:5]',
|
||||
sourceMap: true
|
||||
}
|
||||
},
|
||||
{
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
sourceMap: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// WOFF Font
|
||||
{
|
||||
test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
|
||||
use: {
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
mimetype: 'application/font-woff'
|
||||
}
|
||||
}
|
||||
},
|
||||
// WOFF2 Font
|
||||
{
|
||||
test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/,
|
||||
use: {
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
mimetype: 'application/font-woff'
|
||||
}
|
||||
}
|
||||
},
|
||||
// TTF Font
|
||||
{
|
||||
test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
|
||||
use: {
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
mimetype: 'application/octet-stream'
|
||||
}
|
||||
}
|
||||
},
|
||||
// EOT Font
|
||||
{
|
||||
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
|
||||
use: 'file-loader'
|
||||
},
|
||||
// SVG Font
|
||||
{
|
||||
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
|
||||
use: {
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
mimetype: 'image/svg+xml'
|
||||
}
|
||||
}
|
||||
},
|
||||
// Common Image Formats
|
||||
{
|
||||
test: /\.(?:ico|gif|png|jpg|jpeg|webp)$/,
|
||||
use: 'url-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
optimization: {
|
||||
minimizer: process.env.E2E_BUILD
|
||||
? []
|
||||
: [
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
sourceMap: true,
|
||||
cache: true
|
||||
}),
|
||||
new OptimizeCSSAssetsPlugin({
|
||||
cssProcessorOptions: {
|
||||
map: {
|
||||
inline: false,
|
||||
annotation: true
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
/**
|
||||
* Create global constants which can be configured at compile time.
|
||||
*
|
||||
* Useful for allowing different behaviour between development builds and
|
||||
* release builds
|
||||
*
|
||||
* NODE_ENV should be production so that modules do not perform certain
|
||||
* development checks
|
||||
*/
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: 'production'
|
||||
}),
|
||||
|
||||
new MiniCssExtractPlugin({
|
||||
filename: 'style.css'
|
||||
}),
|
||||
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerMode:
|
||||
process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
|
||||
openAnalyzer: process.env.OPEN_ANALYZER === 'true'
|
||||
})
|
||||
]
|
||||
});
|
3
desktop-app/flow-typed/module_vx.x.x.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
declare module 'module' {
|
||||
declare module.exports: any;
|
||||
}
|
3
desktop-app/internals/flow/CSSModule.js.flow
Normal file
|
@ -0,0 +1,3 @@
|
|||
// @flow
|
||||
|
||||
declare export default { [key: string]: string }
|
2
desktop-app/internals/flow/WebpackAsset.js.flow
Normal file
|
@ -0,0 +1,2 @@
|
|||
// @flow
|
||||
declare export default string
|
BIN
desktop-app/internals/img/eslint-padded-90.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
desktop-app/internals/img/eslint-padded.png
Normal file
After Width: | Height: | Size: 9.5 KiB |
BIN
desktop-app/internals/img/eslint.png
Executable file
After Width: | Height: | Size: 9.9 KiB |
BIN
desktop-app/internals/img/flow-padded-90.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
desktop-app/internals/img/flow-padded.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
desktop-app/internals/img/flow.png
Executable file
After Width: | Height: | Size: 6.2 KiB |
BIN
desktop-app/internals/img/jest-padded-90.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
desktop-app/internals/img/jest-padded.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
desktop-app/internals/img/jest.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
desktop-app/internals/img/js-padded.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
desktop-app/internals/img/js.png
Executable file
After Width: | Height: | Size: 5 KiB |
BIN
desktop-app/internals/img/npm.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
desktop-app/internals/img/react-padded-90.png
Normal file
After Width: | Height: | Size: 4 KiB |
BIN
desktop-app/internals/img/react-padded.png
Normal file
After Width: | Height: | Size: 5 KiB |
BIN
desktop-app/internals/img/react-router-padded-90.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
desktop-app/internals/img/react-router-padded.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
desktop-app/internals/img/react-router.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
desktop-app/internals/img/react.png
Executable file
After Width: | Height: | Size: 5.5 KiB |
BIN
desktop-app/internals/img/redux-padded-90.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
desktop-app/internals/img/redux-padded.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
desktop-app/internals/img/redux.png
Executable file
After Width: | Height: | Size: 20 KiB |
BIN
desktop-app/internals/img/webpack-padded-90.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
desktop-app/internals/img/webpack-padded.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
desktop-app/internals/img/webpack.png
Executable file
After Width: | Height: | Size: 5.4 KiB |
BIN
desktop-app/internals/img/yarn-padded-90.png
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
desktop-app/internals/img/yarn-padded.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
desktop-app/internals/img/yarn.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
1
desktop-app/internals/mocks/fileMock.js
Normal file
|
@ -0,0 +1 @@
|
|||
export default 'test-file-stub';
|
35
desktop-app/internals/scripts/CheckBuiltsExist.js
Normal file
|
@ -0,0 +1,35 @@
|
|||
// @flow
|
||||
// Check if the renderer and main bundles are built
|
||||
import path from 'path';
|
||||
import chalk from 'chalk';
|
||||
import fs from 'fs';
|
||||
|
||||
function CheckBuildsExist() {
|
||||
const mainPath = path.join(__dirname, '..', '..', 'app', 'main.prod.js');
|
||||
const rendererPath = path.join(
|
||||
__dirname,
|
||||
'..',
|
||||
'..',
|
||||
'app',
|
||||
'dist',
|
||||
'renderer.prod.js'
|
||||
);
|
||||
|
||||
if (!fs.existsSync(mainPath)) {
|
||||
throw new Error(
|
||||
chalk.whiteBright.bgRed.bold(
|
||||
'The main process is not built yet. Build it by running "yarn build-main"'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (!fs.existsSync(rendererPath)) {
|
||||
throw new Error(
|
||||
chalk.whiteBright.bgRed.bold(
|
||||
'The renderer process is not built yet. Build it by running "yarn build-renderer"'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
CheckBuildsExist();
|
17
desktop-app/internals/scripts/CheckNodeEnv.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
// @flow
|
||||
import chalk from 'chalk';
|
||||
|
||||
export default function CheckNodeEnv(expectedEnv: string) {
|
||||
if (!expectedEnv) {
|
||||
throw new Error('"expectedEnv" not set');
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== expectedEnv) {
|
||||
console.log(
|
||||
chalk.whiteBright.bgRed.bold(
|
||||
`"process.env.NODE_ENV" must be "${expectedEnv}" to use this webpack config`
|
||||
)
|
||||
);
|
||||
process.exit(2);
|
||||
}
|
||||
}
|
19
desktop-app/internals/scripts/CheckPortInUse.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
// @flow
|
||||
import chalk from 'chalk';
|
||||
import detectPort from 'detect-port';
|
||||
|
||||
(function CheckPortInUse() {
|
||||
const port: string = process.env.PORT || '1212';
|
||||
|
||||
detectPort(port, (err: ?Error, availablePort: number) => {
|
||||
if (port !== String(availablePort)) {
|
||||
throw new Error(
|
||||
chalk.whiteBright.bgRed.bold(
|
||||
`Port "${port}" on "localhost" is already in use. Please use another port. ex: PORT=4343 yarn dev`
|
||||
)
|
||||
);
|
||||
} else {
|
||||
process.exit(0);
|
||||
}
|
||||
});
|
||||
})();
|
283
desktop-app/package.json
Normal file
|
@ -0,0 +1,283 @@
|
|||
{
|
||||
"name": "electron-react-boilerplate",
|
||||
"productName": "ElectronReact",
|
||||
"version": "0.17.1",
|
||||
"description": "Electron application boilerplate based on React, React Router, Webpack, React Hot Loader for rapid application development",
|
||||
"scripts": {
|
||||
"build": "concurrently \"yarn build-main\" \"yarn build-renderer\"",
|
||||
"build-dll": "cross-env NODE_ENV=development webpack --config ./configs/webpack.config.renderer.dev.dll.babel.js --colors",
|
||||
"build-e2e": "cross-env E2E_BUILD=true yarn build",
|
||||
"build-main": "cross-env NODE_ENV=production webpack --config ./configs/webpack.config.main.prod.babel.js --colors",
|
||||
"build-renderer": "cross-env NODE_ENV=production webpack --config ./configs/webpack.config.renderer.prod.babel.js --colors",
|
||||
"dev": "cross-env START_HOT=1 node -r @babel/register ./internals/scripts/CheckPortInUse.js && cross-env START_HOT=1 yarn start-renderer-dev",
|
||||
"flow": "flow",
|
||||
"flow-typed": "rimraf flow-typed/npm && flow-typed install --overwrite || true",
|
||||
"lint": "cross-env NODE_ENV=development eslint --cache --format=pretty .",
|
||||
"lint-fix": "yarn --silent lint --fix; exit 0",
|
||||
"lint-styles": "stylelint --ignore-path .eslintignore '**/*.*(css|scss)' --syntax scss",
|
||||
"lint-styles-fix": "yarn --silent lint-styles --fix; exit 0",
|
||||
"package": "yarn build && electron-builder build --publish never",
|
||||
"package-all": "yarn build && electron-builder build -mwl",
|
||||
"package-ci": "yarn postinstall && yarn build && electron-builder --publish always",
|
||||
"package-linux": "yarn build && electron-builder build --linux",
|
||||
"package-win": "yarn build && electron-builder build --win --x64",
|
||||
"postinstall": "yarn flow-typed && electron-builder install-app-deps package.json && yarn build-dll && opencollective-postinstall",
|
||||
"postlint-fix": "prettier --ignore-path .eslintignore --single-quote --write '**/*.{*{js,jsx,json},babelrc,eslintrc,prettierrc,stylelintrc}'",
|
||||
"postlint-styles-fix": "prettier --ignore-path .eslintignore --single-quote --write '**/*.{css,scss}'",
|
||||
"precommit": "lint-staged",
|
||||
"prestart": "yarn build",
|
||||
"start": "cross-env NODE_ENV=production electron ./app/main.prod.js",
|
||||
"start-main-dev": "cross-env HOT=1 NODE_ENV=development electron -r @babel/register ./app/main.dev.js",
|
||||
"start-renderer-dev": "cross-env NODE_ENV=development webpack-dev-server --config configs/webpack.config.renderer.dev.babel.js",
|
||||
"test": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 jest",
|
||||
"test-all": "yarn lint && yarn flow && yarn build && yarn test && yarn build-e2e && yarn test-e2e",
|
||||
"test-e2e": "node -r @babel/register ./internals/scripts/CheckBuiltsExist.js && cross-env NODE_ENV=test testcafe electron:./ ./test/e2e/HomePage.e2e.js",
|
||||
"test-e2e-live": "node -r @babel/register ./internals/scripts/CheckBuiltsExist.js && cross-env NODE_ENV=test testcafe-live electron:./ ./test/e2e/HomePage.e2e.js",
|
||||
"test-watch": "yarn test --watch"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,jsx}": [
|
||||
"cross-env NODE_ENV=development eslint --cache --format=pretty",
|
||||
"prettier --ignore-path .eslintignore --single-quote --write",
|
||||
"git add"
|
||||
],
|
||||
"{*.json,.{babelrc,eslintrc,prettierrc,stylelintrc}}": [
|
||||
"prettier --ignore-path .eslintignore --parser json --write",
|
||||
"git add"
|
||||
],
|
||||
"*.{css,scss}": [
|
||||
"stylelint --ignore-path .eslintignore --syntax scss --fix",
|
||||
"prettier --ignore-path .eslintignore --single-quote --write",
|
||||
"git add"
|
||||
],
|
||||
"*.{yml,md}": [
|
||||
"prettier --ignore-path .eslintignore --single-quote --write",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"main": "./app/main.prod.js",
|
||||
"build": {
|
||||
"productName": "ElectronReact",
|
||||
"appId": "org.develar.ElectronReact",
|
||||
"files": [
|
||||
"app/dist/",
|
||||
"app/app.html",
|
||||
"app/main.prod.js",
|
||||
"app/main.prod.js.map",
|
||||
"package.json"
|
||||
],
|
||||
"dmg": {
|
||||
"contents": [
|
||||
{
|
||||
"x": 130,
|
||||
"y": 220
|
||||
},
|
||||
{
|
||||
"x": 410,
|
||||
"y": 220,
|
||||
"type": "link",
|
||||
"path": "/Applications"
|
||||
}
|
||||
]
|
||||
},
|
||||
"win": {
|
||||
"target": [
|
||||
"nsis",
|
||||
"msi"
|
||||
]
|
||||
},
|
||||
"linux": {
|
||||
"target": [
|
||||
"deb",
|
||||
"rpm",
|
||||
"snap",
|
||||
"AppImage"
|
||||
],
|
||||
"category": "Development"
|
||||
},
|
||||
"directories": {
|
||||
"buildResources": "resources",
|
||||
"output": "release"
|
||||
},
|
||||
"publish": {
|
||||
"provider": "github",
|
||||
"owner": "electron-react-boilerplate",
|
||||
"repo": "electron-react-boilerplate",
|
||||
"private": false
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/electron-react-boilerplate/electron-react-boilerplate.git"
|
||||
},
|
||||
"author": {
|
||||
"name": "Electron React Boilerplte Maintainers",
|
||||
"email": "electronreactboilerplate@gmail.com",
|
||||
"url": "https://electron-react-boilerplate.js.org"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Vikram Rangaraj",
|
||||
"email": "vikr01@icloud.com",
|
||||
"url": "https://github.com/vikr01"
|
||||
},
|
||||
{
|
||||
"name": "Amila Welihinda",
|
||||
"email": "amilajack@gmail.com",
|
||||
"url": "https://github.com/amilajack"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"electron",
|
||||
"boilerplate",
|
||||
"react",
|
||||
"redux",
|
||||
"flow",
|
||||
"sass",
|
||||
"webpack",
|
||||
"hot",
|
||||
"reload"
|
||||
],
|
||||
"homepage": "https://github.com/electron-react-boilerplate/electron-react-boilerplate#readme",
|
||||
"jest": {
|
||||
"testURL": "http://localhost/",
|
||||
"moduleNameMapper": {
|
||||
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/internals/mocks/fileMock.js",
|
||||
"\\.(css|less|sass|scss)$": "identity-obj-proxy"
|
||||
},
|
||||
"moduleFileExtensions": [
|
||||
"js",
|
||||
"jsx",
|
||||
"json"
|
||||
],
|
||||
"transform": {
|
||||
"^.+\\.jsx?$": "babel-jest"
|
||||
},
|
||||
"setupFiles": [
|
||||
"./internals/scripts/CheckBuiltsExist.js"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.1.6",
|
||||
"@babel/plugin-proposal-class-properties": "^7.1.0",
|
||||
"@babel/plugin-proposal-decorators": "^7.1.6",
|
||||
"@babel/plugin-proposal-do-expressions": "^7.0.0",
|
||||
"@babel/plugin-proposal-export-default-from": "^7.0.0",
|
||||
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
|
||||
"@babel/plugin-proposal-function-bind": "^7.0.0",
|
||||
"@babel/plugin-proposal-function-sent": "^7.1.0",
|
||||
"@babel/plugin-proposal-json-strings": "^7.0.0",
|
||||
"@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
|
||||
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
|
||||
"@babel/plugin-proposal-pipeline-operator": "^7.0.0",
|
||||
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
|
||||
"@babel/plugin-syntax-import-meta": "^7.0.0",
|
||||
"@babel/plugin-transform-react-constant-elements": "^7.0.0",
|
||||
"@babel/plugin-transform-react-inline-elements": "^7.0.0",
|
||||
"@babel/preset-env": "^7.1.6",
|
||||
"@babel/preset-flow": "^7.0.0",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@babel/register": "^7.0.0",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-jest": "^23.6.0",
|
||||
"babel-loader": "^8.0.4",
|
||||
"babel-plugin-dev-expression": "^0.2.1",
|
||||
"babel-plugin-transform-react-remove-prop-types": "^0.4.20",
|
||||
"chalk": "^2.4.1",
|
||||
"concurrently": "^4.1.0",
|
||||
"connected-react-router": "^5.0.1",
|
||||
"cross-env": "^5.2.0",
|
||||
"cross-spawn": "^6.0.5",
|
||||
"css-loader": "^1.0.1",
|
||||
"detect-port": "^1.3.0",
|
||||
"electron": "^3.0.10",
|
||||
"electron-builder": "^20.34.0",
|
||||
"electron-devtools-installer": "^2.2.4",
|
||||
"enzyme": "^3.7.0",
|
||||
"enzyme-adapter-react-16": "^1.7.0",
|
||||
"enzyme-to-json": "^3.3.4",
|
||||
"eslint": "^5.9.0",
|
||||
"eslint-config-airbnb": "^17.1.0",
|
||||
"eslint-config-prettier": "^3.3.0",
|
||||
"eslint-formatter-pretty": "^2.0.0",
|
||||
"eslint-import-resolver-webpack": "^0.10.1",
|
||||
"eslint-plugin-compat": "^2.6.3",
|
||||
"eslint-plugin-flowtype": "^3.2.0",
|
||||
"eslint-plugin-import": "^2.14.0",
|
||||
"eslint-plugin-jest": "^22.0.0",
|
||||
"eslint-plugin-jsx-a11y": "6.1.2",
|
||||
"eslint-plugin-promise": "^4.0.1",
|
||||
"eslint-plugin-react": "^7.11.1",
|
||||
"eslint-plugin-testcafe": "^0.2.1",
|
||||
"fbjs-scripts": "^1.0.1",
|
||||
"file-loader": "^2.0.0",
|
||||
"flow-bin": "^0.77.0",
|
||||
"flow-runtime": "^0.17.0",
|
||||
"flow-typed": "^2.5.1",
|
||||
"husky": "^1.1.4",
|
||||
"identity-obj-proxy": "^3.0.0",
|
||||
"jest": "^23.6.0",
|
||||
"lint-staged": "^8.1.0",
|
||||
"mini-css-extract-plugin": "^0.4.4",
|
||||
"node-sass": "^4.10.0",
|
||||
"opencollective-postinstall": "^2.0.1",
|
||||
"optimize-css-assets-webpack-plugin": "^5.0.1",
|
||||
"prettier": "^1.15.2",
|
||||
"react-test-renderer": "^16.6.3",
|
||||
"redux-logger": "^3.0.6",
|
||||
"rimraf": "^2.6.2",
|
||||
"sass-loader": "^7.1.0",
|
||||
"sinon": "^7.1.1",
|
||||
"spectron": "^5.0.0",
|
||||
"style-loader": "^0.23.1",
|
||||
"stylelint": "^9.8.0",
|
||||
"stylelint-config-prettier": "^4.0.0",
|
||||
"stylelint-config-standard": "^18.2.0",
|
||||
"terser-webpack-plugin": "^1.1.0",
|
||||
"testcafe": "^0.23.2",
|
||||
"testcafe-browser-provider-electron": "^0.0.6",
|
||||
"testcafe-live": "^0.1.4",
|
||||
"testcafe-react-selectors": "^3.0.0",
|
||||
"url-loader": "^1.1.2",
|
||||
"webpack": "^4.26.0",
|
||||
"webpack-bundle-analyzer": "^3.0.3",
|
||||
"webpack-cli": "^3.1.2",
|
||||
"webpack-dev-server": "^3.1.10",
|
||||
"webpack-merge": "^4.1.4",
|
||||
"yarn": "^1.12.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.5.0",
|
||||
"devtron": "^1.4.0",
|
||||
"electron-debug": "^2.0.0",
|
||||
"electron-log": "^2.2.17",
|
||||
"electron-updater": "^3.2.3",
|
||||
"history": "^4.7.2",
|
||||
"react": "^16.6.3",
|
||||
"react-dom": "^16.6.3",
|
||||
"react-hot-loader": "^4.3.12",
|
||||
"react-redux": "^5.1.1",
|
||||
"react-router": "^4.3.1",
|
||||
"react-router-dom": "^4.3.1",
|
||||
"redux": "^4.0.1",
|
||||
"redux-thunk": "^2.3.0",
|
||||
"source-map-support": "^0.5.9"
|
||||
},
|
||||
"devEngines": {
|
||||
"node": ">=7.x",
|
||||
"npm": ">=4.x",
|
||||
"yarn": ">=0.21.3"
|
||||
},
|
||||
"collective": {
|
||||
"url": "https://opencollective.com/electron-react-boilerplate-594"
|
||||
},
|
||||
"browserslist": "electron 1.6"
|
||||
}
|
9
desktop-app/renovate.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"extends": ["config:base"],
|
||||
"rangeStrategy": "bump",
|
||||
"baseBranches": ["next"],
|
||||
"automerge": true,
|
||||
"major": {
|
||||
"automerge": false
|
||||
}
|
||||
}
|
BIN
desktop-app/resources/icon.icns
Normal file
BIN
desktop-app/resources/icon.ico
Normal file
After Width: | Height: | Size: 361 KiB |
BIN
desktop-app/resources/icon.png
Executable file
After Width: | Height: | Size: 32 KiB |
BIN
desktop-app/resources/icons/1024x1024.png
Executable file
After Width: | Height: | Size: 156 KiB |
BIN
desktop-app/resources/icons/128x128.png
Executable file
After Width: | Height: | Size: 17 KiB |
BIN
desktop-app/resources/icons/16x16.png
Executable file
After Width: | Height: | Size: 954 B |
BIN
desktop-app/resources/icons/24x24.png
Executable file
After Width: | Height: | Size: 1.9 KiB |
BIN
desktop-app/resources/icons/256x256.png
Executable file
After Width: | Height: | Size: 32 KiB |
BIN
desktop-app/resources/icons/32x32.png
Executable file
After Width: | Height: | Size: 2 KiB |
BIN
desktop-app/resources/icons/48x48.png
Executable file
After Width: | Height: | Size: 5 KiB |
BIN
desktop-app/resources/icons/512x512.png
Executable file
After Width: | Height: | Size: 77 KiB |