Skip to content

Commit f99a45d

Browse files
amilajacksteveetmrqbikrenovate-botjooohhn
committed
* Refactored to use redux-toolkit (electron-react-boilerplate#2411) * Refactored to use react-toolkit * Refactored to use react-toolkit - Changed incrementIfOdd's logic back to the original - created a selector for count - Removed unnecessary types - Utilise AppThunk - moved @types/webpack-env to devDependencies * Refactored to use react-toolkit - removed counterActions - reducer is the default export from slice - added typescript-eslint/parser to handle 'import * as ... from' * Fix TypeScript errors in menu.ts (electron-react-boilerplate#2416) * Fix TypeScript errors in menu.ts Apparently, MenuItemConstructorOptions.selector is a Darwin-only attribute. TypeScript detects it and displays an error. To fix this error we can cast it to MenuItemConstructorOptions. * Fixed accidentally removed type definition * Fixed another accidentally removed type definition Seems good. * Edited as requested * Fixed lint error * Update babel monorepo * Update dependency @fortawesome/fontawesome-free to ^5.13.0 * Update dependency @types/react-dom to ^16.9.6 * Update dependency @hot-loader/react-dom to ^16.13.0 * Update dependency @types/react-router to ^5.1.5 * Update dependency @types/sinon to ^7.5.2 * Missing yarn.lock from merge Co-authored-by: rqbik <[email protected]> Co-authored-by: Renovate Bot <[email protected]> * migrate to latest erb eslint config * feat(routets): lazy load routes (electron-react-boilerplate#2464) * remove gif from readme * use latest eslint-config-erb * chore(deps): bump deps * drop azure pipelines support * Swap `typed-css-modules-webpack-plugin` for `typings-for-css-modules-loader` * use latest version of eslint-config-erb * add experimental support for vscode debugging * Remove unnecessary file extensions from ts exclude (electron-react-boilerplate#2480) * remove .css,.map from ts exclude * Remove nonexistant app/main.js * Revert electron-react-boilerplate#2365 as default for users, provide as opt in option Co-authored-by: steveetm <[email protected]> Co-authored-by: rqbik <[email protected]> Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: John Tran <[email protected]>
1 parent 55848df commit f99a45d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+3552
-4471
lines changed

.eslintrc.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,25 @@ module.exports = {
22
extends: 'erb/typescript',
33
rules: {
44
// A temporary hack related to IDE not resolving correct package.json
5-
'import/no-extraneous-dependencies': 'off'
5+
'import/no-extraneous-dependencies': 'off',
6+
},
7+
parserOptions: {
8+
ecmaVersion: 2020,
9+
sourceType: 'module',
10+
project: './tsconfig.json',
11+
tsconfigRootDir: __dirname,
12+
createDefaultProgram: true,
613
},
714
settings: {
815
'import/resolver': {
916
// See https://github.com/benmosher/eslint-plugin-import/issues/1396#issuecomment-575727774 for line below
1017
node: {},
1118
webpack: {
12-
config: require.resolve('./configs/webpack.config.eslint.js')
13-
}
14-
}
15-
}
19+
config: require.resolve('./configs/webpack.config.eslint.js'),
20+
},
21+
},
22+
'import/parsers': {
23+
'@typescript-eslint/parser': ['.ts', '.tsx'],
24+
},
25+
},
1626
};

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
- name: Install Node.js, NPM and Yarn
1818
uses: actions/setup-node@v1
1919
with:
20-
node-version: 13
20+
node-version: 14
2121

2222
- name: yarn install
2323
run: |
24-
yarn install
24+
yarn install --frozen-lockfile
2525
2626
- name: yarn test
2727
env:

.vscode/extensions.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"recommendations": ["dbaeumer.vscode-eslint", "EditorConfig.EditorConfig"]
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"EditorConfig.EditorConfig",
5+
"msjsdiag.debugger-for-chrome"
6+
]
37
}

.vscode/launch.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "launch",
7+
"name": "Electron: Main",
8+
"protocol": "inspector",
9+
"runtimeExecutable": "yarn",
10+
"runtimeArgs": ["start-main-debug"],
11+
"preLaunchTask": "Start Webpack Dev"
12+
},
13+
{
14+
"name": "Electron: Renderer",
15+
"type": "chrome",
16+
"request": "attach",
17+
"port": 9223,
18+
"webRoot": "${workspaceFolder}",
19+
"timeout": 15000
20+
}
21+
],
22+
"compounds": [
23+
{
24+
"name": "Electron: All",
25+
"configurations": ["Electron: Main", "Electron: Renderer"]
26+
}
27+
]
28+
}

.vscode/tasks.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"label": "Start Webpack Dev",
7+
"script": "start-renderer-dev",
8+
"options": {
9+
"cwd": "${workspaceFolder}"
10+
},
11+
"isBackground": true,
12+
"problemMatcher": {
13+
"owner": "custom",
14+
"pattern": {
15+
"regexp": "____________"
16+
},
17+
"background": {
18+
"activeOnStart": true,
19+
"beginsPattern": "Compiling\\.\\.\\.$",
20+
"endsPattern": "(Compiled successfully|Failed to compile)\\.$"
21+
}
22+
}
23+
}
24+
]
25+
}

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# 1.2.0
2+
3+
- Migrate to redux toolkit
4+
- Lazy load routes with react suspense
5+
- Drop support for azure-pipelines and use only github actions
6+
- Bump all deps to latest semver
7+
- Remove `test-e2e` script from tests (blocked on release of https://github.com/DevExpress/testcafe-browser-provider-electron/pull/65)
8+
- Swap `typed-css-modules-webpack-plugin` for `typings-for-css-modules-loader`
9+
- Use latest version of `eslint-config-erb`
10+
- Remove unnecessary file extensions from ts exclude
11+
- Add experimental support for vscode debugging
12+
- Revert https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2365 as default for users, provide as opt in option
13+
114
# 1.1.0
215

316
- Fix #2402

LICENSE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22-

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@
3636

3737
</div>
3838

39-
<div align="center">
40-
41-
![Electron Boilerplate Demo](https://cloud.githubusercontent.com/assets/3382565/10557547/b1f07a4e-74e3-11e5-8d27-79ab6947d429.gif)
42-
43-
</div>
44-
4539
## Install
4640

4741
- **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)**

app/Routes.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1+
/* eslint react/jsx-props-no-spreading: off */
12
import React from 'react';
23
import { Switch, Route } from 'react-router-dom';
34
import routes from './constants/routes.json';
45
import App from './containers/App';
56
import HomePage from './containers/HomePage';
6-
import CounterPage from './containers/CounterPage';
7+
8+
// Lazily load routes and code split with webpacck
9+
const LazyCounterPage = React.lazy(() =>
10+
import(/* webpackChunkName: "CounterPage" */ './containers/CounterPage')
11+
);
12+
13+
const CounterPage = (props: Record<string, any>) => (
14+
<React.Suspense fallback={<h1>Loading...</h1>}>
15+
<LazyCounterPage {...props} />
16+
</React.Suspense>
17+
);
718

819
export default function Routes() {
920
return (

app/actions/counter.ts

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)