Skip to content

Commit 0217d6e

Browse files
committed
feat: webpack config optimization
1 parent cd6fc71 commit 0217d6e

File tree

62 files changed

+727
-566
lines changed

Some content is hidden

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

62 files changed

+727
-566
lines changed

examples/advanced/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ then navigate to [http://127.0.0.1:6001/](http://127.0.0.1:6001/)
1919

2020
## Basic Usage
2121

22-
- add a new page in /client folder, eg. `/client/test.jsx`
23-
- start app: `npm start`
24-
- navigate to [http://127.0.0.1:6001/test](http://127.0.0.1:6001/test)
22+
* add a new page in /client folder, eg. `/client/test.jsx`
23+
* start app: `npm start`
24+
* navigate to [http://127.0.0.1:6001/test](http://127.0.0.1:6001/test)
2525

2626
## [Document](https://github.com/alibaba/beidou)
2727

examples/advanced/client/about.jsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ import React from 'react';
33
export default ({ contacts }) => (
44
<div>
55
<h2>about</h2>
6-
<ul>
7-
{contacts.map(contact => (
8-
<li>{contact}</li>
9-
))}
10-
</ul>
6+
<ul>{contacts.map(contact => <li>{contact}</li>)}</ul>
117
</div>
128
);

examples/antd-admin/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ then navigate to [http://127.0.0.1:6001/](http://127.0.0.1:6001/)
2020

2121
## Basic Usage
2222

23-
- add a new page in /client folder, eg. `/client/test.jsx`
24-
- start app: `npm start`
25-
- navigate to [http://127.0.0.1:6001/test](http://127.0.0.1:6001/test)
23+
* add a new page in /client folder, eg. `/client/test.jsx`
24+
* start app: `npm start`
25+
* navigate to [http://127.0.0.1:6001/test](http://127.0.0.1:6001/test)
2626

2727
## License
2828

examples/antd-admin/app/db/files/dashboard.json

+16-8
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@
155155
"email": "[email protected]",
156156
"sales": 3241,
157157
"sold": 3556,
158-
"avatar": "http://tva4.sinaimg.cn/crop.0.0.996.996.180/6ee6a3a3jw8f0ks5pk7btj20ro0rodi0.jpg"
158+
"avatar":
159+
"http://tva4.sinaimg.cn/crop.0.0.996.996.180/6ee6a3a3jw8f0ks5pk7btj20ro0rodi0.jpg"
159160
},
160161
"completed": [
161162
{
@@ -223,35 +224,40 @@
223224
{
224225
"name": "Young",
225226
"status": 3,
226-
"content": "Mokrgg fifjkv sodsg dekjcev rtvgyoif twygggivk mmicccaecs ytdrpcwjr dvt vqeeknvmsh gweyawhjeu ffquwn ccbhankrrs nfffo gxaes yegh wvseoonbx.",
227+
"content":
228+
"Mokrgg fifjkv sodsg dekjcev rtvgyoif twygggivk mmicccaecs ytdrpcwjr dvt vqeeknvmsh gweyawhjeu ffquwn ccbhankrrs nfffo gxaes yegh wvseoonbx.",
227229
"avatar": "http://dummyimage.com/48x48/f2ea79/757575.png&text=Y",
228230
"date": "2016-11-25 03:48:31"
229231
},
230232
{
231233
"name": "Anderson",
232234
"status": 2,
233-
"content": "Qugbqpd ntnefe myxiyghv umcefljy uwa wyfdhqpy afdjmc ijaseknkt ouhkvhjuf yxdrdme fuqevll wkdwgxk oxfdc enool rcfbvcdl.",
235+
"content":
236+
"Qugbqpd ntnefe myxiyghv umcefljy uwa wyfdhqpy afdjmc ijaseknkt ouhkvhjuf yxdrdme fuqevll wkdwgxk oxfdc enool rcfbvcdl.",
234237
"avatar": "http://dummyimage.com/48x48/c679f2/757575.png&text=A",
235238
"date": "2016-04-28 04:41:22"
236239
},
237240
{
238241
"name": "Hernandez",
239242
"status": 1,
240-
"content": "Exetthwjjo tsikinow jcm dfmgao zmhohytlvc hnoadvt dzdu fbbuclfmk ihekxx piubgfnf noehu lpvrf rolswulcgg lofrymx uanbddxs exbdz ltpearih dlqafqccsd.",
243+
"content":
244+
"Exetthwjjo tsikinow jcm dfmgao zmhohytlvc hnoadvt dzdu fbbuclfmk ihekxx piubgfnf noehu lpvrf rolswulcgg lofrymx uanbddxs exbdz ltpearih dlqafqccsd.",
241245
"avatar": "http://dummyimage.com/48x48/79f2a3/757575.png&text=H",
242246
"date": "2016-08-03 18:42:47"
243247
},
244248
{
245249
"name": "Harris",
246250
"status": 2,
247-
"content": "Orkkw aunwa xqln kmau oksmxesrt uif uhbjwg lxmnxr jljrcyyup iqucbsih mhfxl osmf.",
251+
"content":
252+
"Orkkw aunwa xqln kmau oksmxesrt uif uhbjwg lxmnxr jljrcyyup iqucbsih mhfxl osmf.",
248253
"avatar": "http://dummyimage.com/48x48/f28079/757575.png&text=H",
249254
"date": "2016-09-12 12:00:37"
250255
},
251256
{
252257
"name": "Jones",
253258
"status": 2,
254-
"content": "Gmwibg clygg bpxdjuv ytioscxdx xhznqi ixxml oblawmedi iqfnyvxyyr vjynmbn jyjzm mooh eplh mivhkqep inxhi.",
259+
"content":
260+
"Gmwibg clygg bpxdjuv ytioscxdx xhznqi ixxml oblawmedi iqfnyvxyyr vjynmbn jyjzm mooh eplh mivhkqep inxhi.",
255261
"avatar": "http://dummyimage.com/48x48/7995f2/757575.png&text=J",
256262
"date": "2016-02-19 18:12:45"
257263
}
@@ -513,8 +519,10 @@
513519
"quote": {
514520
"name": "Joho Doe",
515521
"title": "Graphic Designer",
516-
"content": "I'm selfish, impatient and a little insecure. I make mistakes, I am out of control and at times hard to handle. But if you can't handle me at my worst, then you sure as hell don't deserve me at my best.",
517-
"avatar": "http://img.hb.aicdn.com/bc442cf0cc6f7940dcc567e465048d1a8d634493198c4-sPx5BR_fw236"
522+
"content":
523+
"I'm selfish, impatient and a little insecure. I make mistakes, I am out of control and at times hard to handle. But if you can't handle me at my worst, then you sure as hell don't deserve me at my best.",
524+
"avatar":
525+
"http://img.hb.aicdn.com/bc442cf0cc6f7940dcc567e465048d1a8d634493198c4-sPx5BR_fw236"
518526
},
519527
"numbers": [
520528
{

examples/antd-admin/app/db/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
const path = require('path');
88
const db = require('diskdb');
99

10-
module.exports = db.connect(
11-
path.join(__dirname, 'files'),
12-
['user', 'dashboard']
13-
);
10+
module.exports = db.connect(path.join(__dirname, 'files'), [
11+
'user',
12+
'dashboard',
13+
]);

examples/antd-admin/client/components/data-table/index.jsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ class DataTable extends React.Component {
6666
};
6767

6868
fetch = () => {
69-
const {
70-
fetch: { url, data, dataKey },
71-
} = this.props;
69+
const { fetch: { url, data, dataKey } } = this.props;
7270
const { fetchData } = this.state;
7371
this.setState({ loading: true });
7472
this.promise = request({

examples/antd-admin/client/store/index.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,11 @@ export default function configureStore(
1515
return createStore(
1616
rootReducer,
1717
initialState,
18-
compose(
19-
applyMiddleware(sagaMiddleware),
20-
debug
21-
)
18+
compose(applyMiddleware(sagaMiddleware), debug)
2219
);
2320
}
2421
return createStore(
2522
rootReducer,
26-
compose(
27-
applyMiddleware(sagaMiddleware),
28-
debug
29-
)
23+
compose(applyMiddleware(sagaMiddleware), debug)
3024
);
3125
}

examples/antd-components/client/components/list.jsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -519,9 +519,8 @@ export default class Demo extends Component {
519519
</List.Item>
520520
)}
521521
>
522-
{this.state.loading && this.state.hasMore && (
523-
<Spin className="demo-loading" />
524-
)}
522+
{this.state.loading &&
523+
this.state.hasMore && <Spin className="demo-loading" />}
525524
</List>
526525
</InfiniteScroll>
527526
</div>

examples/antd-components/client/components/select/user.jsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ class UserRemoteSelect extends React.Component {
6060
onChange={this.handleChange}
6161
style={{ width: '100%' }}
6262
>
63-
{data.map(d => (
64-
<Option key={d.value}>{d.text}</Option>
65-
))}
63+
{data.map(d => <Option key={d.value}>{d.text}</Option>)}
6664
</Select>
6765
);
6866
}

examples/antd-components/client/components/table/menu.jsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ class App extends React.Component {
5959
<span>
6060
{record.name
6161
.split(reg)
62-
.map((text, i) =>
63-
(i > 0
64-
? [<span className="highlight">{match[0]}</span>, text]
65-
: text)
62+
.map(
63+
(text, i) =>
64+
(i > 0
65+
? [<span className="highlight">{match[0]}</span>, text]
66+
: text)
6667
)}
6768
</span>
6869
),

0 commit comments

Comments
 (0)