Skip to content

Commit d4de076

Browse files
committed
fix line end
1 parent 7add556 commit d4de076

File tree

5 files changed

+13
-23
lines changed

5 files changed

+13
-23
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

build/webpack-config/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ module.exports = (paths) => {
3131
path: paths.dist(),
3232
publicPath: '/'
3333
},
34-
performance: env.config.performance
34+
performance: envConfig.performance
3535
};
3636
};

build/webpack-config/loaders.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin');
44

55
const isDev = env.isDev;
66
module.exports = () => {
7-
const loaders = [{
7+
const loaderArray = [{
88
test: /\.(js|jsx)$/,
99
exclude: /node_modules/,
1010
loader: 'babel-loader'
@@ -41,12 +41,13 @@ module.exports = () => {
4141
}];
4242
if (!isDev) {
4343
debug('Apply ExtractTextPlugin to CSS loaders.(非开发环境应用ExtractTextPluginLoaders到css loaders)');
44-
loaders.filter(loader => loader.loaders && loader.loaders.find(name => /css/.test(name.split('?')[0]))).forEach((loader) => {
45-
const first = loader.loaders[0];
46-
const rest = loader.loaders.slice(1);
47-
loader.loader = ExtractTextPlugin.extract({ fallbackLoader: first, loader: rest.join('!') });
48-
delete loader.loaders;
49-
});
44+
loaderArray.filter(loaderObj => loaderObj.loaders && loaderObj.loaders.find(name => /css/.test(name.split('?')[0])))
45+
.forEach((loaderObj) => {
46+
const first = loaderObj.loaders[0]; // except style-loader
47+
const rest = loaderObj.loaders.slice(1);
48+
loaderObj.loader = ExtractTextPlugin.extract({ fallbackLoader: first, loader: rest.join('!') });
49+
delete loaderObj.loaders;
50+
});
5051
}
51-
return loaders;
52+
return loaderArray;
5253
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
}
2626
},
2727
"compile": {
28-
"command": "rimraf dist/* && npm run lint && node bin/compile",
28+
"command": "rimraf dist/* && npm run lint:fix && node bin/compile",
2929
"env": {
3030
"DEBUG": "app:*:compile*",
3131
"NODE_ENV": "production"

src/store/createStore.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,9 @@ export default (initialState = {}) => {
2828
), { location }
2929
);
3030
browserHistory.listen(updateLocation(store));
31+
3132
// inject global reducers
3233
store.injectAll(globalReducerMaps);
3334

34-
// store.asyncReducers = {};
35-
36-
// // Anywhere, you can call store.unsubscribeHistory() to cancel subscribe;
37-
// store.unsubscribeHistory = browserHistory.listen(updateLocation(store));
38-
39-
// // Make reducers hot reloadable, see http://mxs.is/googmo
40-
// if (module.hot) {
41-
// module.hot.accept('../utils/reducerTool', () => {
42-
// const makeReducer = require('../utils/reducerTool').default;
43-
// store.replaceReducer(makeReducer(store.asyncReducers));
44-
// });
45-
// }
46-
4735
return store;
4836
};

0 commit comments

Comments
 (0)