Skip to content

Commit 66416bd

Browse files
committedNov 6, 2016
Remove default example
1 parent 2d9e732 commit 66416bd

File tree

159 files changed

+78
-4496
lines changed

Some content is hidden

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

159 files changed

+78
-4496
lines changed
 

‎app/app.js

+11-29
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@
44
* This is the entry file for the application, only setup and boilerplate
55
* code.
66
*/
7-
8-
// Needed for redux-saga es6 generator support
97
import 'babel-polyfill';
108

119
/* eslint-disable import/no-unresolved, import/extensions */
12-
// Load the favicon, the manifest.json file and the .htaccess file
13-
import 'file?name=[name].[ext]!./favicon.ico';
10+
// Load the manifest.json file and the .htaccess file
1411
import '!file?name=[name].[ext]!./manifest.json';
1512
import 'file?name=[name].[ext]!./.htaccess';
1613
/* eslint-enable import/no-unresolved, import/extensions */
@@ -21,31 +18,16 @@ import ReactDOM from 'react-dom';
2118
import { Provider } from 'react-redux';
2219
import { applyRouterMiddleware, Router, browserHistory } from 'react-router';
2320
import { syncHistoryWithStore } from 'react-router-redux';
24-
import FontFaceObserver from 'fontfaceobserver';
2521
import { useScroll } from 'react-router-scroll';
26-
import configureStore from './store';
27-
28-
// Import Language Provider
2922
import LanguageProvider from 'containers/LanguageProvider';
30-
31-
// Import CSS reset and Global Styles
32-
import 'sanitize.css/sanitize.css';
33-
import './global-styles';
34-
35-
// Observe loading of Open Sans (to remove open sans, remove the <link> tag in
36-
// the index.html file and this observer)
37-
const openSansObserver = new FontFaceObserver('Open Sans', {});
38-
39-
// When Open Sans is loaded, add a font-family using Open Sans to the body
40-
openSansObserver.load().then(() => {
41-
document.body.classList.add('fontLoaded');
42-
}, () => {
43-
document.body.classList.remove('fontLoaded');
44-
});
23+
import configureStore from './store';
4524

4625
// Import i18n messages
4726
import { translationMessages } from './i18n';
4827

28+
// Import the CSS reset, which HtmlWebpackPlugin transfers to the build folder
29+
import 'sanitize.css/sanitize.css';
30+
4931
// Create redux store with history
5032
// this uses the singleton browserHistory provided by react-router
5133
// Optionally, this could be changed to leverage a created history
@@ -69,10 +51,11 @@ const rootRoute = {
6951
childRoutes: createRoutes(store),
7052
};
7153

72-
const render = (messages) => {
54+
55+
const render = (translatedMessages) => {
7356
ReactDOM.render(
7457
<Provider store={store}>
75-
<LanguageProvider messages={messages}>
58+
<LanguageProvider messages={translatedMessages}>
7659
<Router
7760
history={history}
7861
routes={rootRoute}
@@ -88,6 +71,7 @@ const render = (messages) => {
8871
);
8972
};
9073

74+
9175
// Hot reloadable translation json files
9276
if (module.hot) {
9377
// modules.hot.accept does not accept dynamic dependencies,
@@ -103,7 +87,6 @@ if (!window.Intl) {
10387
resolve(System.import('intl'));
10488
}))
10589
.then(() => Promise.all([
106-
System.import('intl/locale-data/jsonp/en.js'),
10790
System.import('intl/locale-data/jsonp/de.js'),
10891
]))
10992
.then(() => render(translationMessages))
@@ -117,6 +100,5 @@ if (!window.Intl) {
117100
// Install ServiceWorker and AppCache in the end since
118101
// it's not most important operation and if main code fails,
119102
// we do not want it installed
120-
if (process.env.NODE_ENV === 'production') {
121-
require('offline-plugin/runtime').install(); // eslint-disable-line global-require
122-
}
103+
import { install } from 'offline-plugin/runtime';
104+
install();

‎app/components/A/index.js

-15
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.