Skip to content

Commit e953ff2

Browse files
committed
Merge remote-tracking branch 'origin/dev.docs' into dev.todolist-browser
2 parents 30fbb76 + 407c859 commit e953ff2

24 files changed

+1303
-84
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Matthew Lean
3+
Copyright (c) 2018-2019 Matthew Lean
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

docs/envs/browser/building.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Use the `build` [`package.json`](../../../package.json) script to create a build
44

55
The `build:debug` [`package.json`](../../../package.json) script can be used to debug the webpack configuration with a [Node.js inspector client](https://nodejs.org/en/docs/guides/debugging-getting-started/#inspector-clients). The `build:stats` [`package.json`](../../../package.json) script generates a `stats.production.json` file in the project root directory which can be used with many analysis tools such as [analyse](https://github.com/webpack/analyse).
66

7+
The production build process generates `records.json` which is used to store module IDs across separate builds. This allows the generation of longer lasting filenames, makes sure that code split parts gain correct caching behavior, and that modules aren't reordered or moved to another chunk during the bundling process which results to less cache invalidations. **This file should checked into version control.**
8+
79
For more details on what the webpack build process is doing, read the ["Configuration: webpack" documentation](configuration.md#webpack).
810

911
## Development

docs/envs/browser/configuration.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
By default [`.browserslist`](../../../.browerslist) is set to `defaults` which is the equivalent to `> 0.5%, last 2 versions, Firefox ESR, not dead`. It is highly recommended that you change this based on the browsers your users are using. If you use [Google Analytics](https://marketingplatform.google.com/about/analytics), you can generate usage stats from it and determine your config with [browserslist-ga](https://github.com/browserslist/browserslist-ga).
2727

2828
## ESLint
29-
[ESLint](https://eslint.org) helps identify potential problems and deviations from code style guidelines in your JavaScript. The config file can be found in the project's root directory as [`.eslintrc`](../../../.eslintrc.json). For more info on configuring ESLint, read the [ESLint "Configuring ESLint" docs](https://eslint.org/docs/user-guide/configuring).
29+
[ESLint](https://eslint.org) helps identify potential problems and deviations from code style guidelines in your JavaScript. The config file can be found in the project's root directory as [`.eslintrc`](../../../.eslintrc.json). The ignored file configuration can also be found in the root directory as [`.eslintignore`](../../../.eslintignore). For more info on configuring ESLint, read the [ESLint "Configuring ESLint" docs](https://eslint.org/docs/user-guide/configuring).
3030

3131
### Environments
3232
* Browser: Supports browser global variables
@@ -65,6 +65,9 @@ These specific rules override any rules set by config extensions and will trigge
6565
### Settings
6666
The React and Flow versions match the versions used in the project, as specified by [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react). These versions can be found in [`package.json`](../../../package.json).
6767

68+
### Ignored Files
69+
[`jest.config.js`](../../../jest.config.js) is ignored as linting the Jest configuration is not necessary.
70+
6871
## Flow
6972
[Flow](https://flow.org) is a static type checker for JavaScript. The config file can be found in the project's root directory as [`.flowconfig`](../../../.flowconfig). For more info on configuring Flow, read the [Flow ".flowconfig" docs](https://flow.org/en/docs/config).
7073

@@ -87,7 +90,7 @@ module.name_mapper.extension='scss' -> 'empty/object'
8790
```
8891

8992
## Jest
90-
[Jest](https://jestjs.io) lets you build and run tests on your JavaScript. The config file can be found in the project's root directory as [`jest.config.js`](../../../.jest.config.js). For more info on configuring Jest, read the [Jest "Configuring Jest" docs](https://jestjs.io/docs/en/configuration.html).
93+
[Jest](https://jestjs.io) lets you build and run tests on your JavaScript. The config file can be found in the project's root directory as [`jest.config.js`](../../../jest.config.js). For more info on configuring Jest, read the [Jest "Configuring Jest" docs](https://jestjs.io/docs/en/configuration.html).
9194

9295
### Options
9396
`moduleNameMapper` is set to the following so snapshots can handle assets like images and fonts as well as styles in spapshot tests:
@@ -98,10 +101,21 @@ moduleNameMapper: {
98101
},
99102
```
100103

101-
`snapshotSeralizer` is set to [enzyme-to-json](https://github.com/adriantoine/enzyme-to-json) so Enzyme wrappers are converted to a format compatible with Jest snapshot tests.
104+
`snapshotSerializer` is set to [enzyme-to-json](https://github.com/adriantoine/enzyme-to-json) so Enzyme wrappers are converted to a format compatible with Jest snapshot tests.
105+
106+
`testPathIgnorePatterns` will have Jest ignore the `node_modules/` (which is ignored by default) and `build/` directories.
107+
108+
## nodemon
109+
[nodemon](https://nodemon.io) reruns Node.js applications when file changes are detected. For this project it is used to rerun package.json scripts to rebuild and rerun the application. The config file can be found in the project's root directory as [`nodemon.json`](../../../nodemon.json). This file sets what nodemon will watch and ignore by default. These settings can be overridden by CLI options.
110+
111+
### Watched Files
112+
Watch `.js`, `.json`, and `.jsx` files, the [`config/`](../../../config) directory, [`nodemon.json`](../../../nodemon.json), and [`webpack.config.js`](../../../webpack.config.js).
113+
114+
### Ignored Files
115+
All `.test.js` and `.test.jsx` files.
102116

103117
## package.json
104-
[`package.json`](../../../package.json) is the main file that tells npm and Yarn about the project. For more info on the project's [`package.json`](../../../package.json) scripts, read the ["Developing: package.json Scripts" documentation](developing.md#packagejson-scripts). For more info on configuring `package.json`, read the [npm "package.json" docs](https://docs.npmjs.com/files/package.json).
118+
[`package.json`](../../../package.json) is the main file that tells npm and Yarn about the project. For more info on the project's [`package.json`](../../../package.json) scripts, read the ["Developing: package.json Scripts" documentation](developing.md#packagejson-scripts). For more info on configuring [`package.json`](../../../package.json), read the [npm "package.json" docs](https://docs.npmjs.com/files/package.json).
105119

106120
## stylelint
107121
[stylelint](https://stylelint.io) helps identify potential problems and deviations from code style guidelines in your CSS and Sass. The config file can be found in the project's root directory as [`.stylelintrc`](../../../.stylelintrc). For more info on configuring stylelint, read the [stylelint "Configuration" docs](https://stylelint.io/user-guide/configuration).
@@ -131,7 +145,7 @@ Start building from `src/main.jsx`. More info can be found in the [webpack "Entr
131145
```javascript
132146
resolve: { extensions: ['.js', '.jsx', '.json'] }
133147
```
134-
Look for files with .js, .jsx, or .json extensions. More info can be found in the [webpack "Resolve" docs](https://webpack.js.org/configuration/resolve).
148+
Look for files with `.js`, `.jsx`, or `.json` extensions. More info can be found in the [webpack "Resolve" docs](https://webpack.js.org/configuration/resolve).
135149

136150
#### Compile JavaScript
137151
[`webpack.config.js`](../../../webpack.config.js)
@@ -195,14 +209,14 @@ Load all Sass and compile them into CSS using [Sass Loader](https://github.com/w
195209
```javascript
196210
parts.loadImgs(),
197211
```
198-
Load image files with .gif, .jpg, .jpeg, or .png extensions and transform them into base64 URIs which are inlined into the JavaScript bundle using [url-loader](https://github.com/webpack-contrib/url-loader).
212+
Load image files with `.gif`, `.jpg`, `.jpeg`, or `.png` extensions and transform them into base64 URIs which are inlined into the JavaScript bundle using [url-loader](https://github.com/webpack-contrib/url-loader).
199213

200214
#### Load fonts
201215
[`config/development.js`](../../../config/development.js)
202216
```javascript
203217
parts.loadFonts(),
204218
```
205-
Load font files with .eot, .tff, .woff, or .woff2 extensions and transform them into base64 URIs which are inlined into the JavaScript bundle using [url-loader](https://github.com/webpack-contrib/url-loader).
219+
Load font files with `.eot`, `.tff`, `.woff`, or `.woff2` extensions and transform them into base64 URIs which are inlined into the JavaScript bundle using [url-loader](https://github.com/webpack-contrib/url-loader).
206220

207221
#### Generate source maps
208222
[`config/development.js`](../../../config/development.js)
@@ -224,7 +238,7 @@ Start building from `src/main.jsx`. More info can be found in the [webpack "Entr
224238
```javascript
225239
resolve: { extensions: ['.js', '.jsx', '.json'] }
226240
```
227-
Look for files with .js, .jsx, or .json extensions. More info can be found in the [webpack "Resolve" docs](https://webpack.js.org/configuration/resolve).
241+
Look for files with `.js`, `.jsx`, or `.json` extensions. More info can be found in the [webpack "Resolve" docs](https://webpack.js.org/configuration/resolve).
228242

229243
#### Compile JavaScript
230244
[`webpack.config.js`](../../../webpack.config.js)
@@ -313,7 +327,7 @@ parts.loadImgs({
313327
type: 'file'
314328
}),
315329
```
316-
Load image files with .gif, .jpg, .jpeg, or .png extensions and output them in `/assets/imgs/` with [file-loader](https://github.com/webpack-contrib/file-loader).
330+
Load image files with `.gif`, `.jpg`, `.jpeg`, or `.png` extensions and output them in `/assets/imgs/` with [file-loader](https://github.com/webpack-contrib/file-loader).
317331

318332
#### Load fonts
319333
[`config/production.js`](../../../config/production.js)
@@ -325,7 +339,7 @@ parts.loadFonts({
325339
type: 'file'
326340
}),
327341
```
328-
Load font files with .eot, .tff, .woff, or .woff2 extensions and output them in `/assets/imgs/` with [file-loader](https://github.com/webpack-contrib/file-loader).
342+
Load font files with `.eot`, `.tff`, `.woff`, or `.woff2` extensions and output them in `/assets/imgs/` with [file-loader](https://github.com/webpack-contrib/file-loader).
329343

330344
#### Generate source maps
331345
[`config/production.js`](../../../config/production.js)

docs/envs/browser/dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Mock store for testing `redux` asynchronous action creators and middleware
103103
* [**`sass-loader`**](https://npmjs.com/package/sass-loader)
104104
`webpack` loader to compile `node-sass` into CSS
105105
* [**`style-loader`**](https://npmjs.com/package/style-loader)
106-
`webpack` loader that adds CSS to the DOM by injecting a <style> tag
106+
`webpack` loader that adds CSS to the DOM by injecting a `<style>` tag
107107
* [**`stylelint`**](https://npmjs.com/package/stylelint)
108108
Style linter
109109
* [**`stylelint-config-recommended`**](https://npmjs.com/package/stylelint-config-recommended)

docs/envs/desktop/configuration.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
[electron-builder](https://electron.build/configuration/configuration) builds the app into an executable for macOS, Windows, or Linux. The config utilizes [`package.json`](../../../package.json). For more info on configurating electron-builder, read the [electron-builder "Common Configuration" docs](https://electron.build/configuration/configuration).
2323

2424
## ESLint
25-
[ESLint](https://eslint.org) helps identify potential problems and deviations from code style guidelines in your JavaScript. The config file can be found in the project's root directory as [`.eslintrc`](../../../.eslintrc.json). For more info on configuring ESLint, read the [ESLint "Configuring ESLint" docs](https://eslint.org/docs/user-guide/configuring).
25+
[ESLint](https://eslint.org) helps identify potential problems and deviations from code style guidelines in your JavaScript. The config file can be found in the project's root directory as [`.eslintrc`](../../../.eslintrc.json). The ignored file configuration can also be found in the root directory as [`.eslintignore`](../../../.eslintignore). For more info on configuring ESLint, read the [ESLint "Configuring ESLint" docs](https://eslint.org/docs/user-guide/configuring).
2626

2727
### Environments
2828
* Browser: Supports browser global variables
@@ -61,6 +61,9 @@ These specific rules override any rules set by config extensions and will trigge
6161
### Settings
6262
The React and Flow versions match the versions used in the project, as specified by [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react). These versions can be found in [`package.json`](../../../package.json).
6363

64+
### Ignored Files
65+
[`jest.config.js`](../../../jest.config.js) is ignored as linting the Jest configuration is not necessary.
66+
6467
## Flow
6568
[Flow](https://flow.org) is a static type checker for JavaScript. The config file can be found in the project's root directory as [`.flowconfig`](../../../.flowconfig). For more info on configuring Flow, read the [Flow ".flowconfig" docs](https://flow.org/en/docs/config).
6669

@@ -83,7 +86,8 @@ module.name_mapper.extension='scss' -> 'empty/object'
8386
```
8487

8588
## Jest
86-
[Jest](https://jestjs.io) lets you build and run tests on your JavaScript. The config file can be found in the project's root directory as [`jest.config.js`](../../../.jest.config.js). For more info on configuring Jest, read the [Jest "Configuring Jest" docs](https://jestjs.io/docs/en/configuration.html).
89+
[Jest](https://jestjs.io) lets you build and run tests on your JavaScript. The config file can be found in the project's root directory as [`jest.config.js`](../../../jest.config.js). For more info on configuring Jest, read the [Jest "Configuring Jest" docs](https://jestjs.io/docs/en/configuration.html).
90+
8791
### Options
8892
`moduleNameMapper` is set to the following so snapshots can handle assets like images and fonts as well as styles in spapshot tests:
8993
```javascript
@@ -93,10 +97,21 @@ moduleNameMapper: {
9397
},
9498
```
9599

96-
`snapshotSeralizer` is set to [enzyme-to-json](https://github.com/adriantoine/enzyme-to-json) so Enzyme wrappers are converted to a format compatible with Jest snapshot tests.
100+
`snapshotSerializer` is set to [enzyme-to-json](https://github.com/adriantoine/enzyme-to-json) so Enzyme wrappers are converted to a format compatible with Jest snapshot tests.
101+
102+
`testPathIgnorePatterns` will have Jest ignore the `node_modules/` (which is ignored by default) and `build/` directories.
103+
104+
## nodemon
105+
[nodemon](https://nodemon.io) reruns Node.js applications when file changes are detected. For this project it is used to rerun package.json scripts to rebuild and rerun the application. The config file can be found in the project's root directory as [`nodemon.json`](../../../nodemon.json). This file sets what nodemon will watch and ignore by default. These settings can be overridden by CLI options.
106+
107+
### Watched Files
108+
Watch `.js`, `.json`, and `.jsx` files, the [`config/`](../../../config) directory, [`nodemon.json`](../../../nodemon.json), [`src/main/`](../../../src/main), and [`webpack.config.js`](../../../webpack.config.js).
109+
110+
### Ignored Files
111+
All `.test.js` and `.test.jsx` files.
97112

98113
## package.json
99-
[`package.json`](../../../package.json) is the main file that tells npm and Yarn about the project. For more info on the project's [`package.json`](../../../package.json) scripts, read the ["Developing: package.json Scripts" documentation](developing.md#packagejson-scripts). For more info on configuring `package.json`, read the [npm "package.json" docs](https://docs.npmjs.com/files/package.json).
114+
[`package.json`](../../../package.json) is the main file that tells npm and Yarn about the project. For more info on the project's [`package.json`](../../../package.json) scripts, read the ["Developing: package.json Scripts" documentation](developing.md#packagejson-scripts). For more info on configuring [`package.json`](../../../package.json), read the [npm "package.json" docs](https://docs.npmjs.com/files/package.json).
100115

101116
## stylelint
102117
[stylelint](https://stylelint.io) helps identify potential problems and deviations from code style guidelines in your CSS and Sass. The config file can be found in the project's root directory as [`.stylelintrc`](../../../.stylelintrc). For more info on configuring stylelint, read the [stylelint "Configuration" docs](https://stylelint.io/user-guide/configuration).
@@ -255,7 +270,7 @@ Start building from `src/renderer/main.jsx`. More info can be found in the [webp
255270
```javascript
256271
resolve: { extensions: ['.js', '.jsx', '.json'] },
257272
```
258-
Look for files with .js, .jsx, or .json extensions. More info can be found in the [webpack "Resolve" docs](https://webpack.js.org/configuration/resolve).
273+
Look for files with `.js`, `.jsx`, or `.json` extensions. More info can be found in the [webpack "Resolve" docs](https://webpack.js.org/configuration/resolve).
259274

260275
##### Target
261276
[`config/renderer/index.js`](../../../config/renderer/index.js)
@@ -327,14 +342,14 @@ Load all Sass and compile them into CSS using [Sass Loader](https://github.com/w
327342
```javascript
328343
parts.loadImgs(),
329344
```
330-
Load image files with .gif, .jpg, .jpeg, or .png extensions and transform them into base64 URIs which are inlined into the JavaScript bundle using [url-loader](https://github.com/webpack-contrib/url-loader).
345+
Load image files with `.gif`, `.jpg`, `.jpeg`, or `.png` extensions and transform them into base64 URIs which are inlined into the JavaScript bundle using [url-loader](https://github.com/webpack-contrib/url-loader).
331346

332347
##### Load fonts
333348
[`config/renderer/development.js`](../../../config/renderer/development.js)
334349
```javascript
335350
parts.loadFonts(),
336351
```
337-
Load font files with .eot, .tff, .woff, or .woff2 extensions and transform them into base64 URIs which are inlined into the JavaScript bundle using [url-loader](https://github.com/webpack-contrib/url-loader).
352+
Load font files with `.eot`, `.tff`, `.woff`, or `.woff2` extensions and transform them into base64 URIs which are inlined into the JavaScript bundle using [url-loader](https://github.com/webpack-contrib/url-loader).
338353

339354
##### Generate source maps
340355
[`config/renderer/development.js`](../../../config/renderer/development.js)
@@ -449,14 +464,14 @@ Remove unused selectors in CSS using [PurifyCSS Plugin](https://github.com/webpa
449464
```javascript
450465
parts.loadImgs(),
451466
```
452-
Load image files with .gif, .jpg, .jpeg, or .png extensions and transform them into base64 URIs which are inlined into the JavaScript bundle using [url-loader](https://github.com/webpack-contrib/url-loader).
467+
Load image files with `.gif`, `.jpg`, `.jpeg`, or `.png` extensions and transform them into base64 URIs which are inlined into the JavaScript bundle using [url-loader](https://github.com/webpack-contrib/url-loader).
453468

454469
##### Load fonts
455470
[`config/renderer/production.js`](../../../config/renderer/production.js)
456471
```javascript
457472
parts.loadFonts(),
458473
```
459-
Load font files with .eot, .tff, .woff, or .woff2 extensions and transform them into base64 URIs which are inlined into the JavaScript bundle using [url-loader](https://github.com/webpack-contrib/url-loader).
474+
Load font files with `.eot`, `.tff`, `.woff`, or `.woff2` extensions and transform them into base64 URIs which are inlined into the JavaScript bundle using [url-loader](https://github.com/webpack-contrib/url-loader).
460475

461476
#### Generate source maps
462477
[`config/renderer/production.js`](../../../config/renderer/production.js)

docs/envs/desktop/dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Mock store for testing `redux` asynchronous action creators and middleware
111111
* [**`sass-loader`**](https://npmjs.com/package/sass-loader)
112112
`webpack` loader to compile `node-sass` into CSS
113113
* [**`style-loader`**](https://npmjs.com/package/style-loader)
114-
`webpack` loader that adds CSS to the DOM by injecting a <style> tag
114+
`webpack` loader that adds CSS to the DOM by injecting a `<style>` tag
115115
* [**`stylelint`**](https://npmjs.com/package/stylelint)
116116
Style linter
117117
* [**`stylelint-config-recommended`**](https://npmjs.com/package/stylelint-config-recommended)

docs/envs/desktop/developing.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* `development`: Development builds generated here
55
* `production`: Production builds generated here
66
* [`config`](../../../config): webpack environment configuration
7+
* [`common`](../../../config/common): General webpack configuration code
8+
* [`main`](../../../config/main): webpack configuration for main process
9+
* [`renderer`](../../../config/renderer): webpack configuration for renderer process
710
* [`src`](../../../src): Application source code
811
* [`__mocks__`](../../../src/__mocks__): Mock test files
912
* [`main`](../../../src/main): Source code for main process

0 commit comments

Comments
 (0)