Skip to content

Commit

Permalink
Fix site and switch benchmarks to parcel
Browse files Browse the repository at this point in the history
  • Loading branch information
emmatown committed Jul 1, 2018
1 parent 3a0fe42 commit 07aaace
Show file tree
Hide file tree
Showing 7 changed files with 488 additions and 364 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
},
"resolutions": {
"**/react": "^16.3.2",
"**/react-dom": "^16.3.2"
"**/react-dom": "^16.3.2",
"**/browserslist": "^4.0.0"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.51",
Expand Down
5 changes: 4 additions & 1 deletion scripts/benchmarks/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>Performance tests</title>
</head>

<body>
<div class="root"></div>
<script src="./index.js"></script>
</body>

</html>
1 change: 1 addition & 0 deletions scripts/benchmarks/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'babel-polyfill'
import cssModules from './src/css-modules'
import emotion from './src/emotion'
import emotionCSS from './src/emotion-css'
Expand Down
17 changes: 7 additions & 10 deletions scripts/benchmarks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,27 @@
"glamor": "^2.20.37",
"glamorous": "^4.1.0",
"marky": "^1.2.0",
"postcss": "^6.0.8",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-emotion": "^9.2.4",
"styled-components": "^2.2.1"
},
"devDependencies": {
"babel-loader": "^7.1.1",
"babel-plugin-macros": "^2.0.0",
"babel-polyfill": "^6.26.0",
"cli-chart": "^0.3.1",
"cli-table": "^0.3.1",
"css-loader": "^0.28.4",
"html-webpack-plugin": "^2.30.1",
"puppeteer": "^0.10.1",
"react-addons-perf": "^15.6.0-rc.1",
"serve": "^6.0.6",
"style-loader": "^0.18.2",
"webpack": "^3.4.1",
"webpack-bundle-analyzer": "^2.9.0"
"parcel": "^1.9.3"
},
"scripts": {
"build:benchmark": "webpack",
"build:benchmark": "parcel build index.html",
"benchmark": "npm run build:benchmark && node run-headless.js"
},
"version": "9.2.4"
"version": "9.2.4",
"babel": {
"presets": [["env", { "modules": false }], "react", "stage-0"],
"plugins": ["babel-plugin-macros"]
}
}
5 changes: 4 additions & 1 deletion scripts/benchmarks/tests/renderSierpinskiTriangle.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ const node = document.querySelector('.root')
let runs = 20

class Speedometer extends React.Component {
state = { renderCount: -1 }
constructor(props) {
super(props)
this.state = { renderCount: -1 }
}

async componentDidMount() {
const durations = []
Expand Down
57 changes: 0 additions & 57 deletions scripts/benchmarks/webpack.config.js

This file was deleted.

Loading

0 comments on commit 07aaace

Please sign in to comment.