Skip to content

Commit

Permalink
v0.13.3 (#1481)
Browse files Browse the repository at this point in the history
* Misc code style changes to menu.js

* v0.13.3

* More consistent node path

* Allowed node_modules to be checked by flow

* add prettier to format js files (#1418)

* Remove jsdom dep (#1411)

* Remove dynamic import dep (#1408)

* Add .sass files support (#1412)

* Update webpack.config.renderer.dev.dll.js

* update webpack to support sass files

* update webpack to support sass files

* Misc code style changes to menu.js

* chore: add perttier husky lint-stage eslint-config-prettier and add scripts

* refactor: use prettier to format code

* fix: fix lint error and add eslint prettier config

* fix: replace registry url from registry.npmjs.org to registry.yarnpkg.com for new add package

* docs: update changelog

* chore: add format-fix script and make format script just to check which files need to format

* format: use prettier to format webpack files

* docs: update change log - add format-fix script

* feat: add prettier in `lint-fix` script

* Removed unnecessary deps

* Updated deps

* Upgraded to webpack 4

* Run prettier even if eslint fails

* createBrowserHistory to createHashHistory for prod (#1184)

* Filter deps without entrypoint from dll

* Bumped deps

* Temporary hack to get flow working with webpack-cli

* Use module property from dev webpack config in DLL webpack config (#1497)

* Remove jsdom dep (#1411)

* Remove dynamic import dep (#1408)

* Add .sass files support (#1412)

* Update webpack.config.renderer.dev.dll.js

* update webpack to support sass files

* update webpack to support sass files

* Misc code style changes to menu.js

* Use module property from dev webpack config in DLL webpack config

Fixes #1468

To avoid a circular dependency, this relies on a check against the parent module's filename for `webpack.config.renderer.dev.dll.js`. It's expected that developers who rename config files will hopefully grep the codebase for this filename before changing it.

This change also includes this check again when configuring `DllReferencePlugin`, because it is no longer guaranteed that the DLL manifest file exists by the time the renderer config specifies plugins.

I played around with the idea of creating a `webpack-merge` strategy that plucks the value of `module` from the dev webpack config, but it wouldn't help much because, in `webpack.config.renderer.dev.js`, the `DllReferencePlugin` would still try to require the manifest (which would not exist).

* Use includes() rather than indexOf()

* Updated all deps to latest semver

* Bumped deps

* Bumped all deps to latest semver

* Update changelog

* Increased delay for e2e counter test

* Updated lock file

* Bumped ci node versions

* Reverted version change in CHANGELOG [ci skip]
  • Loading branch information
amilajack committed May 24, 2018
1 parent e62ae85 commit cdff3d4
Show file tree
Hide file tree
Showing 32 changed files with 3,683 additions and 2,539 deletions.
5 changes: 4 additions & 1 deletion .eslintrc
Expand Up @@ -4,7 +4,10 @@
"sourceType": "module",
"allowImportExportEverywhere": true
},
"extends": "airbnb",
"extends": [
"airbnb",
"prettier"
],
"env": {
"browser": true,
"node": true
Expand Down
2 changes: 1 addition & 1 deletion .flowconfig
@@ -1,9 +1,9 @@
[ignore]
<PROJECT_ROOT>/node_modules/*
<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/.*
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -3,8 +3,8 @@ sudo: true
language: node_js

node_js:
- 8
- 7
- node
- 9

cache:
yarn: true
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
# 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
Expand Down
5 changes: 4 additions & 1 deletion app/actions/counter.js
Expand Up @@ -21,7 +21,10 @@ export function decrement() {
}

export function incrementIfOdd() {
return (dispatch: (action: actionType) => void, getState: () => counterStateType) => {
return (
dispatch: (action: actionType) => void,
getState: () => counterStateType
) => {
const { counter } = getState();

if (counter % 2 === 0) {
Expand Down
2 changes: 1 addition & 1 deletion app/app.html
Expand Up @@ -37,7 +37,7 @@

document.write(
scripts
.map(script => '<script defer src="' + script + '"><\/script>')
.map(script => `<script defer src="${script}"><\/script>`)
.join('')
);
}
Expand Down
22 changes: 19 additions & 3 deletions app/components/Counter.js
Expand Up @@ -16,7 +16,11 @@ export default class Counter extends Component<Props> {

render() {
const {
increment, incrementIfOdd, incrementAsync, decrement, counter
increment,
incrementIfOdd,
incrementAsync,
decrement,
counter
} = this.props;
return (
<div>
Expand All @@ -35,8 +39,20 @@ export default class Counter extends Component<Props> {
<button className={styles.btn} onClick={decrement} data-tclass="btn">
<i className="fa fa-minus" />
</button>
<button className={styles.btn} onClick={incrementIfOdd} data-tclass="btn">odd</button>
<button className={styles.btn} onClick={() => incrementAsync()} data-tclass="btn">async</button>
<button
className={styles.btn}
onClick={incrementIfOdd}
data-tclass="btn"
>
odd
</button>
<button
className={styles.btn}
onClick={() => incrementAsync()}
data-tclass="btn"
>
async
</button>
</div>
</div>
);
Expand Down
6 changes: 1 addition & 5 deletions app/containers/App.js
Expand Up @@ -9,10 +9,6 @@ export default class App extends React.Component<Props> {
props: Props;

render() {
return (
<div>
{this.props.children}
</div>
);
return <div>{this.props.children}</div>;
}
}
4 changes: 1 addition & 3 deletions app/containers/HomePage.js
Expand Up @@ -8,8 +8,6 @@ export default class HomePage extends Component<Props> {
props: Props;

render() {
return (
<Home />
);
return <Home />;
}
}
23 changes: 12 additions & 11 deletions app/main.dev.js
Expand Up @@ -20,7 +20,10 @@ if (process.env.NODE_ENV === 'production') {
sourceMapSupport.install();
}

if (process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true') {
if (
process.env.NODE_ENV === 'development' ||
process.env.DEBUG_PROD === 'true'
) {
require('electron-debug')();
const path = require('path');
const p = path.join(__dirname, '..', 'app', 'node_modules');
Expand All @@ -30,17 +33,13 @@ if (process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true')
const installExtensions = async () => {
const installer = require('electron-devtools-installer');
const forceDownload = !!process.env.UPGRADE_EXTENSIONS;
const extensions = [
'REACT_DEVELOPER_TOOLS',
'REDUX_DEVTOOLS'
];
const extensions = ['REACT_DEVELOPER_TOOLS', 'REDUX_DEVTOOLS'];

return Promise
.all(extensions.map(name => installer.default(installer[name], forceDownload)))
.catch(console.log);
return Promise.all(
extensions.map(name => installer.default(installer[name], forceDownload))
).catch(console.log);
};


/**
* Add event listeners...
*/
Expand All @@ -53,9 +52,11 @@ app.on('window-all-closed', () => {
}
});


app.on('ready', async () => {
if (process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true') {
if (
process.env.NODE_ENV === 'development' ||
process.env.DEBUG_PROD === 'true'
) {
await installExtensions();
}

Expand Down

0 comments on commit cdff3d4

Please sign in to comment.