Skip to content

Commit 8d89f59

Browse files
committed
Update docs
1 parent 0b713a0 commit 8d89f59

File tree

2 files changed

+32
-36
lines changed

2 files changed

+32
-36
lines changed

CHANGELOG_V4+.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project on `v4+` will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

66
## [Unreleased]
7+
8+
[Unreleased]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/compare/v4.1.3...HEAD
9+
10+
## [v4.1.3] - 2022-10-16
711
### Added
812
- GitHub community standards & related workflows([#39](https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/pull/39))
913
- GitHub workflows for CI.
@@ -43,6 +47,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4347

4448
[#44]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/pull/44
4549
[#40]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/pull/40
50+
[v4.1.3]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/compare/v4.1.2...v4.1.3
4651

4752
## [v4.1.2] - 2022-08-15
4853
### Added
@@ -64,6 +69,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6469
- `eslint` - `8.21.0` -> `8.22.0`
6570
- `eslint-import-resolver-typescript` - `3.4.0` -> `3.4.1`
6671

72+
[v4.1.2]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/compare/v4.1.1...v4.1.2
73+
6774
## [v4.1.1] - 2022-08-10
6875
### Fixed
6976
- Cannot find module issue reported by TypeScript server on relative imports after setting up native ES module support in [v4.1.0].
@@ -77,6 +84,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
7784
- `@typescript-eslint/eslint-plugin` & `@typescript-eslint/parser` - `5.32.0` -> `5.33.0`
7885
- `eslint-plugin-jest` - `26.7.0` -> `26.8.2`
7986

87+
[v4.1.1]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/compare/v4.1.0...v4.1.1
88+
8089
## [v4.1.0] - 2022-08-07
8190
### Added
8291
- `tsconfig.eslint.json` to avoid ESLint complains for file not being included in project provided.
@@ -117,6 +126,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
117126
- `eslint-import-resolver-webpack` *- Not being used in any part of the boilerplate*
118127
- `lodash` *- Replaced by `webpack-merge` for its' usage in `webpack.config.js`*
119128

129+
[v4.1.0]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/compare/v4.0.0...v4.1.0
130+
120131
## [v4.0.0] - 2022-07-22
121132
### Added
122133
- Jest as default unit testing framework, with sample test suite for `main`.
@@ -184,8 +195,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
184195
- `@types/mocha`, `mocha`, `ts-node` *- Replaced by `@types/jest`, `jest` & `ts-jest`*
185196
- `spectron` *- Deprecated package; No replacement*
186197

187-
[Unreleased]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/compare/v4.1.2...HEAD
188198
[v4.0.0]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/compare/v3.0.0...v4.0.0
189-
[v4.1.0]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/compare/v4.0.0...v4.1.0
190-
[v4.1.1]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/compare/v4.1.0...v4.1.1
191-
[v4.1.2]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/compare/v4.1.1...v4.1.2

README.md

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ Starting from [`v4.0.0`], this project is set to receive regular maintenances. N
2323
Maintenance work will begin on 1st of each month, and expect the new version to be released within the first week of the month. New features from different tools integrated in this boilerplate might not always be implemented at once, especially on experimental features. If you want any particular feature to be implemented, please [file an issue], or consider make a [new pull request].
2424

2525
### Development plan
26-
- [ ] Develop a `create-react-app`-like NPX tool __!!! *([working on it](https://github.com/Devtography/create-ertw-app))*__
26+
- [ ] Develop a `create-react-app`-like NPX tool __!!! *(pending)*__
2727
- [ ] Integrate another end-to-end testing framework to replace [Spectron]
2828
- [ ] Migrate to Webpack 5 `Asset Modules` __*(pending for `v4.2.0`)*__
2929
- [ ] Integrate HMR & Webpack dev server
30-
- [x] Monitor the status of ESM support on [Jest] & [ts-jest] __*(Check [Known issues](#known-issues) for details)*__
30+
- [ ] Introduce `v5.x-beta` releases based on `v4.x` with ESM support.
3131

3232
---
3333

@@ -42,12 +42,18 @@ Maintenance work will begin on 1st of each month, and expect the new version to
4242

4343
- [ESLint] config file `.eslintrc.cjs` introduced in [`v4.1.0`] is written in CommonJS syntax on purpose. As of the release of [`v4.1.0`], ESLint has yet to support ES module for its' config file. __Converting the config file to ES module will result in ESLint not working.__
4444

45-
- As of [`v4.1.2`], [Jest] & [ts-jest] are __NOT__ configured to run the test files as ES modules, despite all other sections of this boilerplate are configured to support native ES modules. Please check [Known issues](#known-issues) for details.
45+
- ESM support introduced in [`v4.1.2`] has been reversed in [`v4.1.3`] as enabling ESM support has caused some incompatibilities with popular packages (e.g. `MUI`) without workarounds. A separate `v5.x-beta` branch will be released in the near future with ESM enabled by default.
4646

4747
---
4848

4949
## Getting started
50-
1. Clone this repository, or if you're hosting your Electron project on GitHub, click [`Use this template`] to create a new project.
50+
1. Clone this repository with the following `git clone` command:
51+
52+
```sh
53+
git clone --depth 1 --branch master https://github.com/Devtography/electron-react-typescript-webpack-boilerplate.git
54+
```
55+
56+
Alternatively, if you're hosting your Electron project on GitHub, click [`Use this template`] to create a new project.
5157

5258
2. Edit the following fields in `package.json` for your own project:
5359

@@ -95,32 +101,17 @@ To package your Electron app, run `npm run prod` to get your code compiled in `p
95101

96102
This solution isn't ideal but since `asar` archiving is meant to improve performance of reading files if bundler like Webpack is not being used. The app packaging workflow defined in this boilerplate already uses Webpack to minify your code in `production` builds, so there shouldn't be any significant performance difference with `asar` archiving disabled.
97103

98-
- __IMPORTANT!!!__
99-
100-
As of [`v4.1.2`], the `jest.mock()` function is broken if [Jest] and [ts-jest] are configured with [ESM Support]. The following code will result in a `SyntaxError` being thrown when trying to execute the test with Jest.
104+
## Contributing
105+
Development of Electron-React-Typescript-Webpack(ERTW) Boilerplate happens 100% open on GitHub, all contributions on bugfixes and improvements are welcomed. Read below to learn how you can take part in improving this boilerplate.
101106

102-
```ts
103-
import { jest } from '@jest/globals';
104-
import { BrowserWindow } from 'electron';
107+
### [Code of Conduct](CODE_OF_CONDUCT.md)
108+
A simple Code of Conduct has been adopted and all project participants are expected to adhere to. Please read [the full text](CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated.
105109

106-
jest.mock('electron', () => {
107-
BrowserWindow: jest.fn().mockImplementation(() => {
108-
loadFile: jest.fn(() => Promise.resolve()),
109-
on: jest.fn(),
110-
}),
111-
});
112-
```
110+
### [Contributing Guide](CONTRIBUTING.md)
111+
Read the [contributing guide](CONTRIBUTING.md) to learn about the development process, how to propose bugfixes and improvements, and how to build and test your changes to ERTW Boilerplate.
113112

114-
```
115-
SyntaxError: The requested module 'electron' does not provide an export named 'BrowserWindow'
116-
```
117-
118-
The current solution is to keep using the non ESM supported version of `jest.config.js`, but with `NODE_OPTIONS=--experimental-vm-modules` set when running Jest (already set in [`v4.1.2`]). The drawback of this is you won't be able to use `import.meta` APIs in your code. It could be a deal breaker for some of you.
119-
120-
I'm closely monitoring the situation atm, and I'll consider rollback the ESM related setting introduced in [`v4.1.0`] if there's no progress made solving this issue by the time I prepare the release of `v4.2.0`. You can track the progress on a related issue [facebook/jest #10025] if you want.
121-
122-
[ESM Support]: https://kulshekhar.github.io/ts-jest/docs/guides/esm-support/
123-
[facebook/jest #10025]: https://github.com/facebook/jest/issues/10025
113+
### Donation
114+
Maintaining this project takes time, lots of cups of coffee, and I do it for free. Consider buy me some coffee via [GitHub Sponsors] or [PayPal]. 100% of your donation will fund my coffee buying budget for quality coffee beans from great roasters I know 😉 ☕️️
124115

125116
## Project folders & files
126117
- `.github/` - GitHub repo config & GitHub Actions workflows
@@ -149,8 +140,8 @@ To package your Electron app, run `npm run prod` to get your code compiled in `p
149140
Consider convert this module into a collection of submodules if you have many APIs for IPC. See example as below:
150141
```ts
151142
// ipc-api/index.ts
152-
import submoduleA from './submodule-a.js';
153-
import submoduleB from './submodule-b.js';
143+
import submoduleA from './submodule-a';
144+
import submoduleB from './submodule-b';
154145

155146
export default { ...submoduleA, ...submoduleB };
156147

@@ -224,9 +215,6 @@ To package your Electron app, run `npm run prod` to get your code compiled in `p
224215

225216
Includes configurations targetting `electron-main`, `electron-preload`, and `electron-renderer` respectively.
226217

227-
## Donation
228-
Maintaining this project takes time, lots of cups of coffee, and I do it for free. Consider buy me some coffee via [GitHub Sponsors] or [PayPal]. 100% of your donation will fund my coffee buying budget for quality coffee beans from great roasters I know 😉 ☕️️
229-
230218
## Author
231219
[Wing Chau](https://github.com/iamWing) [@Devtography](https://github.com/Devtography)
232220

@@ -261,3 +249,4 @@ Electron React TypeScript Webpack Boilerplate is open source software
261249
[`v4.0.0`]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/releases/tag/v4.0.0
262250
[`v4.1.0`]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/releases/tag/v4.1.0
263251
[`v4.1.2`]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/releases/tag/v4.1.2
252+
[`v4.1.3`]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/releases/tag/v4.1.3

0 commit comments

Comments
 (0)