Skip to content
This repository was archived by the owner on Sep 6, 2022. It is now read-only.

Commit c28e153

Browse files
Merge v3.5 release (#1929)
* Docs Update: sass.md | New webpack version -loader suffix (#1484) * New webpack version -loader suffix New webpack version no longer allowed to omit the '-loader' suffix when using loaders. * Webpack 2 migration module.loaders => module.rules * Fix Loaders/Rules * chore(docs): fix link to redux-saga docs Fix a broken link to redux-saga docs. * feat(webpack): Support OpenType fonts with .otf file extension (#1471) * chore(docs): improve testing documentation * [doc] improve code snippet syntax in unit-testing doc linted code snippet and removed uneeded import * [doc] add overview of reducer test in unit testing doc add the completed reducer test file as overview in unit testing documentation * [doc] improve component testing doc linted code snippets, added complete test file as refernce and link to next doc page. * chore(setup): remove LGTM config files (#1317) * chore(setup): remove LGTM * Add collaborating guidelines * Add @KarandikarMihir * Remove .react.js extensions (#1469) * Remove .react.js extensions * Restore file names in the title comments * Remove hyphens * chore(deps): update deps roll-up Jan-21-2017 (#1501) * fix(tests): Replace sinon restore (#1512) * Remove sinon.restore() * Lock down sinon version * chore(all): move to an organisation on GitHub * Make webpack build less verbose (#1510) * removed route names from app/routes (#1509) * removed route names from app/routes * removed name prop from internals/templates/routes * removed name from internals/gens/route/route.hbs and routeWithReducer.hbs * fix(eslint): Enable rule react/no-array-index-key (#1521) * enable rule react/no-array-index-key * fix test of List component * fix(dependencies.js): clean up console clutter for install scripts (#1532) Ref #1506 * Fix typo i18n.md (#1541) * chore(deps): update deps roll-up Jan-28-2017 (#1531) * chore(deps): update deps roll-up Jan-28-2017 * Update package.json * Set history@3.2.1 * Using optimised version of the banner (#1560) Taken from #907 * test(build:clean script): remove test:clean from build:clean - fixes coveralls reporting? (#1563) * Update docs (README.md, Gotchas.md) (#1534) * Update README.md * Update gotchas.md * Add links to gotchas * Update docs * Remove redundant sentence * Move reinstall steps to gotchas.md * Update README.md * Minor corrections * Add jest cache clean to gotchas.md * Fix team of devs link (#1566) * chore(deps): update deps roll-up Feb-04-2017 (#1561) * Add iOS home screen icon (#1585) * fix manifest icons (#1568) * manifest(fix) (#1594) * Change dev source map style (#1559) * (fix) ProgressBar state error (#1553) * Bind listener to the current instance of component * Bring up coverage * Reassign listener with newly bound listener * Minor changes * Separated dev and prod middlewares (#1556) * Update FAQ with Styles getting overridden (#1592) * Improve <List> tests (#1134) * Fix imported styles (#1599) * Migrate webpack loaders * Add comment to CSS loader This should help clarify and reduce common problems * Split css rules into two * Updated docs * First draft of new styling docs * Fix Sass heading * Fix links and wording * Add LESS and other improvements * Post test fixes * Updated headings and added more info section * fix: Intl polyfill for language generator (#1611) * fix: Intl polyfill for language generator * fix: appveyor chrome issue by adding suggested --ignore-checksums * Fix broken link in documentation. Fixes #1638. (#1643) * refactor(react-router-scroll): Import only useScroll (#1609) * chore(package.json): sort ESLint config (#1660) This PR will sort the ESLint configuration alphabetically in `package.json`. * Fix iOS home screen icons (#1604) * Use absolute paths * AppVeyor install chrome ignoring checksums * Add Stateless Functions to Container Generator (#1494) * Add Stateless Functions to Container Generator * Fix linting test for generators * Tightened up generator type names - Also made component and container use similar order and language * Fix odd node5 issue * and disable eslint for the var * Fix missing reference (#1725) * Moving Contrib documentation to the right place (#1721) * refactor(react-router): Import only necessary components (#1608) Instead of importing the entire library, cherry-pick the components we use. This is [supported and encouraged](https://github.com/ReactTraining/react-router/blob/master/docs/guides/MinimizingBundleSize.md) by react-router. Reduced the size of the main bundle by 9 KB (709 KB -> 700 KB). * Fixing links for the contributing.md (#1738) * a grammatical item (#1740) * Remove state update in componentWillUpdate (#1769) * syntatical improvements to progress bar (#1633) * syntatical improvements to progress bar * declare propTypes and defaultProps on the class instead of using the static keyword * Improve the setup to recognize our own repo before clearing it. (#1720) * Add intelligence to the setup to recognize our own repo, before nuking it. (#760, #1719) * Cleaning up console messages upon setup * Adding a prompt for deciding whether to clear the repo or not. Fixed: #760, #1719 * Fixing the scenario where it was not exiting this file after not removing the repository * Doing minor changes suggested * Updating quickstart file location (#1712) * Request utils: handle 204 and 205 HTTP response (#1780) * feat(core): styled-components v2 update (#1775) * feat(core): styled-components v2 update * fix(deps): lock version for styled plugin * Fix: Use local instance of shelljs (#1782) * Use local instance of shelljs * Replace var with const * Switching deprecated babel-preset-latest to babel-preset-env (#1736) * adding babel-preset-env package * replacing deprecated babel-preset-latest with babel-preset-env to avoid the following npm installation warning: ``` npm WARN deprecated babel-preset-latest@6.24.0: preset-latest accomplishes the same task as babel-preset-env. Please install it with 'npm install babel-preset-env --save-dev'. '{ "presets": ["latest"] }' to '{ "presets": ["env"] }'. For more info, please check the docs: http://babeljs.io/docs/plugins/preset-env ``` Ref. #1667 * removing deprecated babel-preset-latest package * Add missing word (#1789) * Migrating from React.PropTypes to PropTypes (#1787) * adding prop-types dependency * migrating from React.PropTypes to PropTypes * Adding some tests (#1784) * tests(FeaturePage): testing shouldComponentUpdate function * tests(HomePage): testing if username prop is missing * tests(ProgressBar): testing when route is not changing * tests: removing global-styles.js from coverage collect * tests(Toggle): adding tests for empty values prop * tests(store): adding missing tests * tests(ProgressBar): adding missing tests * chore(deps): update deps roll-up Jun-01-2017 (#1794) * chore(deps): update deps roll-up Jun-01-2017 * Add react-test-renderer as dev dependency * Remove `react-addons-test-utils` * Use new `react-helmet` API * Get rid of the warning: 'DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see webpack/loader-utils#56 parseQuery() will be replaced with getOptions() in the next major version of loader-utils.' Get rid of the warning: 'DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see webpack/loader-utils#56 parseQuery() will be replaced with getOptions() in the next major version of loader-utils.' * Revert line that wasn't meant to be commited * docs(maintenance): Create dependency update doc (#1790) * docs(maintenance): Create dependency update doc * Update dependency.md * Update dependency.md * Update dependency.md * Update dependency.md * Add link to #598 * Update the 'tagged template literals' link to point to its new home at styled-components.com (#1824) * feat(core): React Router v4, React-Loadable, asyncInjectors (#1746) * Migrate to react router v4. * Make sure Switch renders after redux state change by passing in redux location, propagate computedMatch to Route, and make not-found matcher non-exact. * Fix route generator. * Implicitly pass store into loader from AsyncRoute to simplify custom child route components. * Fix route prop propagation. * Regen yarn.lock * Keep track of route loading in redux state and read in progress bar. * Replace AsyncRoute with react-loadable * Add `DefaultLoadingComponentProvider` * Rename `loader.js` to `Loadable.js` * Revert 9f44f1b * small chores * Add tests * Update generators * Exclude component/Loadable from coverage * Update docs * Make App a class that extends React.Component to enable hot reloading * Add a link to RR4 API * Improve generators * Fix linting errors * Update react-loadable * Update yarn.lock * Propagate InnerLoadable props to the rendered component, for Route props like match. * Refactor * rename withMappedState -> withConnect * rename name to key * Use constants * Make 'daemon' a default mode for `injectReducer` * Simplify `ejectSaga` * Improve docs * clean up * recommend to use `ConnectedSwitch` * turn `App` into a function like it was before * Run CI * Import `memoryHistory` and `browserHistory` from `react-router-dom` instead of `react-router` * Remove path from a 'not found' route * Update deps * Simplify tests * Remove modes from `injectReducer` * Make second argument to be a descriptor in `sagaInjectors` * Change `constants` to have consistent values * Remove non-daemon saga descriptors in production in `ejectSaga` * Save an entire descriptor in the saga registry * Fix `constants` in templates * fix(hmr): Replace `preset-hmre` with vanilla webpack HMR (#1871) * Replace react-hmre with bare webpack hmr * Explicitly unmount the main component * Prevent recomputing reducers for `replaceReducer` * Add a link to Wepack HMR to the docs * Remove `overlay=true` * Accept an array of modules to hot reload * Add Debugging section in Docs + VS Code instructions (#1698) * Add debugging section in README * Move WebStorm FAQ to debugging section * Add VS Code to debugging section * Update VS Code launch config * Update VS Code config to work in dev branch * Add VS Code launch.json config * Update launch.json to be compatible with master * Update VS Code launch to be compatible with master * Remove .vscode launch config * Add notice on source map issue for VS Code. * move onSubmitForm test into mapDispatchToProps test (#1644) * Use camelcase for reducer and saga key to match selector. (#1888) * chore(deps): remove unusable deps sinon (#1882) * chore(deps): downgrade `sanitize.css` (#1872) * chore(templates): turn `App` into a functional component (#1892) Fixes #1884 * fix(generators): use correct selector names in tests and regular selectors should not be nested (#1873) * Rename store.js to configureStore.js to Prevent conflict with storeJS… (#1904) * Rename store.js to configureStore.js to Prevent conflict with storeJS npm package * Fix store -> configureStore * Bump webpack to 3.0.0 and update related deps (#1823) * Bump webpack to 3.0.0 and related deps * Add ModuleConcatenationPlugin to webpack base config * Check in mysterious change in yarn.lock * Install latest html-webpack-plugin and resolve incorrect peer dep issue * Update webpack to 3.5.4 * Bump webpack to 3.5.5 * Move ModuleConcatenationPlugin from base to prod config, add --display-optimization-bailout flag * Serve Dlls via add-asset-html-webpack-plugin (#1849) * Serve Dlls via add-asset-html-webpack-plugin * Remove duplicate dll script tags and cheerio dependency * Remove cheerio refs from docs * Minor whitespace change * Remove eslint exception in webpack.dll.babel.js * chore(deps): Upgrade React to v15.6 (#1832) * chore(deps): regenerate `yarn.lock` (#1931) * chore(deps): regenerate `yarn.lock` * Empty commit to restart netlify * chore(3.5): Update changelog.md
1 parent 27e7398 commit c28e153

File tree

167 files changed

+6372
-4780
lines changed

Some content is hidden

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

167 files changed

+6372
-4780
lines changed

.github/MAINTAINERS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Maintainers
2+
- mxstbr
3+
- oliverturner
4+
- justingreenberg
5+
- gihrig
6+
- sedubois
7+
- chaintng
8+
- samit4me
9+
- amilajack
10+
- Dattaya
11+
- jwinn
12+
- KarandikarMihir

.lgtm

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,14 @@ included in the project:
120120

121121
**IMPORTANT**: By submitting a patch, you agree to allow the project
122122
owners to license your work under the terms of the [MIT License](https://github.com/react-boilerplate/react-boilerplate/blob/master/LICENSE.md).
123+
124+
# Collaborating guidelines
125+
You can find the list of all maintainers in [MAINTAINERS.md](./MAINTAINERS.md).
126+
127+
There are few basic rules to ensure high quality of the boilerplate:
128+
129+
- Before merging, a PR requires at least two approvals from the collaborators unless it's an architectural change, a large feature, etc. If it is, then at least 50% of the core team have to agree to merge it, with every team member having a full veto right. (i.e. every single one can block any PR)
130+
- A PR should remain open for at least two days before merging (does not apply for trivial contributions like fixing a typo). This way everyone has enough time to look into it.
131+
132+
133+
You are always welcome to discuss and propose improvements to this guideline.

Changelog.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,73 @@
11
# Changelog
22

3+
## 3.5 September 2017
4+
5+
## News
6+
7+
So, a few things have changed in the JS ecosystem since the original release of React Boilerplate, and there was a discussion in #1776 around the it's future. TLDR; we had two incompatible PRs — one for server-side rendering, and another for react-router v4. The community decided that we would keep our dependencies up to date (upgrade react-router) and establish a clear mission for React Boilerplate:
8+
9+
**React Boilerplate is a rock-solid foundation for crafting large, high-performance enterprise-grade frontend web applications that have advanced/custom requirements.**
10+
- Static output designed for CDN and edge caches
11+
- Extreme Developer Ergonomics
12+
- Parallelized Tests
13+
- DLL manifest in development for blazing rebuilds
14+
- Scaffolding tools
15+
- Pre-baked i18n support
16+
- Low level tooling that gives developer complete control
17+
18+
We may include SSR in a future version, but for now this is our focus... create-react-app and next.js are doing an awesome job and strongly recommend these projects for most use cases.
19+
20+
### Breaking
21+
22+
- **Upgrade React Router to v4.x.x** (@anuraaga, @Dattaya, et al)
23+
- Use React-Loadable for data lifecycle management
24+
- Refactor `asyncInjectors`: improve code splitting/saga management
25+
- For a complete overview of changes, please see #1746
26+
27+
### Main
28+
29+
- **Upgrade React to v15.6** (@g0ddish)
30+
- **Upgrade Webpack and related dependencies to v3.x.x** (@KarandikarMihir)
31+
- **Upgrade `styled-components` to v2.x.x** (@justingreenberg)
32+
- Replace `babel-preset-hmre` with vanilla Webpack HMR (@Dattaya)
33+
- Serve Dlls via `add-asset-html-webpack-plugin` (@skidding)
34+
- Migrate from `React.PropTypes` to `prop-types` (@dennybiasioll
35+
36+
### Other Updates
37+
38+
- Add Stateless Functions to Container generator (@outdooricon)
39+
- Change development sourcemap style (@samit4me)
40+
- Create new documentation for dependency updates (@gihrig)
41+
- Downgrade `sanitize.css` (@Dattaya)
42+
- Enable rule `react/no-array-index-key` (@carloscuatin)
43+
- Fix `Intl` polyfill in language generator (@tmf)
44+
- Handle 204 and 205 HTTP response (@williamdclt)
45+
- Icon updates and improvements (@samit4me)
46+
- Import only necessary components for RRv4 (@sorin-davidoi)
47+
- Improve `<List>` component tests (@chaintng)
48+
- Improve component tests in demo (@dennybiasiolli)
49+
- Improve setup to recognize repo before clearing git (@Aftabnack)
50+
- Make build output less verbose (@KarandikarMihir)
51+
- Move `onSubmitForm` test into `mapDispatchToProps` test (@tomasfrancisco)
52+
- NPM script and dependency updates, many fixes (@gihrig)
53+
- Remove state update in componentWillUpdate (@mawi12345)
54+
- Remove unused Sinon dependency (@avdeev)
55+
- Remove route names from `app/routes` (@beardedtim)
56+
- Rename `store.js` to `configureStore.js` to prevent conflict (@howardya)
57+
- Separate `dev` and `prod` middleware (@tomazy)
58+
- Sort ESLint config in `package.json` (@bt)
59+
- Support OpenType fonts with `.otf` file extension (@kachkaev)
60+
- Turn `App` into a functional component (@Dattaya)
61+
- Update FAQ for styles getting overridden (@samit4me)
62+
- Update the 'tagged template literals' link (@joncass)
63+
- Use camelcase for reducer and saga key to match selector (@anuraaga)
64+
- Use correct selector names in tests (@Dattaya)
65+
- Use local instance of `shelljs` (@KarandikarMihir)
66+
- Use optimized version of the RBP banner (@tomazy)
67+
- Use relative path for `manifest.json` (@mrharel)
68+
69+
Many fixes to documentation thanks to @Aftabnack, @auchenberg, @danielrob, @gregoralbrecht, @JonathanMerklin, @marciopuga, @NicholasAnthony, @Skaronator, and @vedatmahir
70+
371
## 3.4 January 2017
472

573
### Main

MAINTAINERS

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

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ Now you're ready to rumble!
117117
- [Styling](docs/css): How to work with the CSS tooling
118118
- [Your app](docs/js): Supercharging your app with Routing, Redux, simple
119119
asynchronicity helpers, etc.
120+
- [**Troubleshooting**](docs/general/gotchas.md): Solutions to common problems faced by developers.
120121

121122
## Supporters
122123

app/app.js

Lines changed: 25 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,43 @@ import 'babel-polyfill';
1212
import React from 'react';
1313
import ReactDOM from 'react-dom';
1414
import { Provider } from 'react-redux';
15-
import { applyRouterMiddleware, Router, browserHistory } from 'react-router';
16-
import { syncHistoryWithStore } from 'react-router-redux';
15+
import { ConnectedRouter } from 'react-router-redux';
1716
import FontFaceObserver from 'fontfaceobserver';
18-
import { useScroll } from 'react-router-scroll';
17+
import createHistory from 'history/createBrowserHistory';
1918
import 'sanitize.css/sanitize.css';
2019

2120
// Import root app
2221
import App from 'containers/App';
2322

24-
// Import selector for `syncHistoryWithStore`
25-
import { makeSelectLocationState } from 'containers/App/selectors';
26-
2723
// Import Language Provider
2824
import LanguageProvider from 'containers/LanguageProvider';
2925

3026
// Load the favicon, the manifest.json file and the .htaccess file
3127
/* eslint-disable import/no-webpack-loader-syntax */
32-
import '!file-loader?name=[name].[ext]!./favicon.ico';
28+
import '!file-loader?name=[name].[ext]!./images/favicon.ico';
29+
import '!file-loader?name=[name].[ext]!./images/icon-72x72.png';
30+
import '!file-loader?name=[name].[ext]!./images/icon-96x96.png';
31+
import '!file-loader?name=[name].[ext]!./images/icon-120x120.png';
32+
import '!file-loader?name=[name].[ext]!./images/icon-128x128.png';
33+
import '!file-loader?name=[name].[ext]!./images/icon-144x144.png';
34+
import '!file-loader?name=[name].[ext]!./images/icon-152x152.png';
35+
import '!file-loader?name=[name].[ext]!./images/icon-167x167.png';
36+
import '!file-loader?name=[name].[ext]!./images/icon-180x180.png';
37+
import '!file-loader?name=[name].[ext]!./images/icon-192x192.png';
38+
import '!file-loader?name=[name].[ext]!./images/icon-384x384.png';
39+
import '!file-loader?name=[name].[ext]!./images/icon-512x512.png';
3340
import '!file-loader?name=[name].[ext]!./manifest.json';
3441
import 'file-loader?name=[name].[ext]!./.htaccess'; // eslint-disable-line import/extensions
3542
/* eslint-enable import/no-webpack-loader-syntax */
3643

37-
import configureStore from './store';
44+
import configureStore from './configureStore';
3845

3946
// Import i18n messages
4047
import { translationMessages } from './i18n';
4148

4249
// Import CSS reset and Global Styles
4350
import './global-styles';
4451

45-
// Import routes
46-
import createRoutes from './routes';
47-
4852
// Observe loading of Open Sans (to remove open sans, remove the <link> tag in
4953
// the index.html file and this observer)
5054
const openSansObserver = new FontFaceObserver('Open Sans', {});
@@ -57,49 +61,30 @@ openSansObserver.load().then(() => {
5761
});
5862

5963
// Create redux store with history
60-
// this uses the singleton browserHistory provided by react-router
61-
// Optionally, this could be changed to leverage a created history
62-
// e.g. `const browserHistory = useRouterHistory(createBrowserHistory)();`
6364
const initialState = {};
64-
const store = configureStore(initialState, browserHistory);
65-
66-
// Sync history and store, as the react-router-redux reducer
67-
// is under the non-default key ("routing"), selectLocationState
68-
// must be provided for resolving how to retrieve the "route" in the state
69-
const history = syncHistoryWithStore(browserHistory, store, {
70-
selectLocationState: makeSelectLocationState(),
71-
});
72-
73-
// Set up the router, wrapping all Routes in the App component
74-
const rootRoute = {
75-
component: App,
76-
childRoutes: createRoutes(store),
77-
};
65+
const history = createHistory();
66+
const store = configureStore(initialState, history);
67+
const MOUNT_NODE = document.getElementById('app');
7868

7969
const render = (messages) => {
8070
ReactDOM.render(
8171
<Provider store={store}>
8272
<LanguageProvider messages={messages}>
83-
<Router
84-
history={history}
85-
routes={rootRoute}
86-
render={
87-
// Scroll to top when going to a new page, imitating default browser
88-
// behaviour
89-
applyRouterMiddleware(useScroll())
90-
}
91-
/>
73+
<ConnectedRouter history={history}>
74+
<App />
75+
</ConnectedRouter>
9276
</LanguageProvider>
9377
</Provider>,
94-
document.getElementById('app')
78+
MOUNT_NODE
9579
);
9680
};
9781

98-
// Hot reloadable translation json files
9982
if (module.hot) {
83+
// Hot reloadable React components and translation json files
10084
// modules.hot.accept does not accept dynamic dependencies,
10185
// have to be constants at compile-time
102-
module.hot.accept('./i18n', () => {
86+
module.hot.accept(['./i18n', 'containers/App'], () => {
87+
ReactDOM.unmountComponentAtNode(MOUNT_NODE);
10388
render(translationMessages);
10489
});
10590
}

app/components/Button/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
/**
22
*
3-
* Button.react.js
3+
* Button.js
44
*
55
* A common button, if you pass it a prop "route" it'll render a link to a react-router route
66
* otherwise it'll render a link with an onclick
77
*/
88

9-
import React, { PropTypes, Children } from 'react';
9+
import React, { Children } from 'react';
10+
import PropTypes from 'prop-types';
1011

1112
import A from './A';
1213
import StyledButton from './StyledButton';

app/components/Header/A.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import styled from 'styled-components';
2-
31
import NormalA from 'components/A';
42

5-
const A = styled(NormalA)`
3+
const A = NormalA.extend`
64
padding: 2em 0;
75
`;
86

app/components/Header/HeaderLink.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Link } from 'react-router';
1+
import { Link } from 'react-router-dom';
22
import styled from 'styled-components';
33

44
export default styled(Link)`
@@ -17,7 +17,7 @@ export default styled(Link)`
1717
font-size: 16px;
1818
border: 2px solid #41ADDD;
1919
color: #41ADDD;
20-
20+
2121
&:active {
2222
background: #41ADDD;
2323
color: #FFF;

0 commit comments

Comments
 (0)