Skip to content

Commit efa53c8

Browse files
committed
revert uncareful prettier benchmarks file
1 parent e57af22 commit efa53c8

File tree

10 files changed

+5761
-9745
lines changed

10 files changed

+5761
-9745
lines changed

scripts/bench/benchmarks/hacker-news/benchmark.js

Lines changed: 161 additions & 247 deletions
Large diffs are not rendered by default.

scripts/bench/benchmarks/hacker-news/build.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
'use strict';
22

3-
const {join} = require('path');
3+
const {
4+
join,
5+
} = require('path');
46

57
async function build(reactPath, asyncCopyTo) {
6-
// copy the UMD bundles
8+
// copy the UMD bundles
79
await asyncCopyTo(
810
join(reactPath, 'build', 'dist', 'react.production.min.js'),
9-
join(__dirname, 'react.production.min.js'),
11+
join(__dirname, 'react.production.min.js')
1012
);
1113
await asyncCopyTo(
1214
join(reactPath, 'build', 'dist', 'react-dom.production.min.js'),
13-
join(__dirname, 'react-dom.production.min.js'),
15+
join(__dirname, 'react-dom.production.min.js')
1416
);
1517
}
1618

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
'use strict';
22

33
const fetch = require('node-fetch');
4-
const {writeFileSync} = require('fs');
4+
const { writeFileSync } = require('fs');
55
const stories = 50;
66

77
async function getStory(id) {
8-
const storyRes = await fetch(
9-
`https://hacker-news.firebaseio.com/v0/item/${id}.json`,
10-
);
8+
const storyRes = await fetch(`https://hacker-news.firebaseio.com/v0/item/${id}.json`);
119
return await storyRes.json();
1210
}
1311

1412
async function getTopStories() {
15-
const topStoriesRes = await fetch(
16-
'https://hacker-news.firebaseio.com/v0/topstories.js',
17-
);
13+
const topStoriesRes = await fetch('https://hacker-news.firebaseio.com/v0/topstories.js');
1814
const topStoriesIds = await topStoriesRes.json();
1915

2016
const topStories = [];
@@ -24,10 +20,7 @@ async function getTopStories() {
2420
topStories.push(await getStory(topStoriesId));
2521
}
2622

27-
writeFileSync(
28-
'top-stories.json',
29-
`window.stories = ${JSON.stringify(topStories)}`,
30-
);
23+
writeFileSync('top-stories.json', `window.stories = ${JSON.stringify(topStories)}`);
3124
}
3225

33-
getTopStories();
26+
getTopStories();

0 commit comments

Comments
 (0)