mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-04-30 21:31:40 +08:00
Add release script for benchmarks
This commit is contained in:
4
.github/CONTRIBUTING.md
vendored
4
.github/CONTRIBUTING.md
vendored
@@ -74,7 +74,7 @@ yarn compile --watch
|
||||
To run the interactive storybook:
|
||||
|
||||
```
|
||||
yarn docs:start
|
||||
yarn website
|
||||
```
|
||||
|
||||
When you're also making changes to the 'react-native-web' source files, run this command in another process:
|
||||
@@ -88,7 +88,7 @@ yarn compile --watch
|
||||
To run the performance benchmarks in a browser (opening `./packages/benchmarks/index.html`):
|
||||
|
||||
```
|
||||
yarn benchmark
|
||||
yarn benchmarks
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
"private": true,
|
||||
"name": "react-native-web-monorepo",
|
||||
"scripts": {
|
||||
"benchmark": "cd packages/benchmarks && yarn benchmark",
|
||||
"clean": "del ./packages/*/dist",
|
||||
"compile": "yarn clean && cd packages/react-native-web && babel src --out-dir dist --ignore \"**/__tests__\"",
|
||||
"docs:start": "cd website && yarn start",
|
||||
"docs:release": "cd website && yarn release",
|
||||
"benchmarks": "cd packages/benchmarks && yarn build",
|
||||
"benchmarks:release": "cd packages/benchmarks && yarn release",
|
||||
"website": "cd website && yarn start",
|
||||
"website:release": "cd website && yarn release",
|
||||
"flow": "flow",
|
||||
"fmt": "find packages scripts types website -name '*.js' | grep -v -E '(node_modules|dist|vendor)' | xargs yarn fmt:cmd",
|
||||
"fmt:cmd": "prettier --write",
|
||||
@@ -16,7 +17,7 @@
|
||||
"precommit": "lint-staged",
|
||||
"prerelease": "yarn test && yarn compile",
|
||||
"release": "node ./scripts/release/publish.js",
|
||||
"postrelease": "yarn docs:release",
|
||||
"postrelease": "yarn website:release && yarn benchmarks:release",
|
||||
"test": "yarn flow && yarn lint:check && yarn jest"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="root"></div>
|
||||
<script src="dist/performance.bundle.js"></script>
|
||||
<script src="./bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
"name": "benchmarks",
|
||||
"version": "0.3.1",
|
||||
"scripts": {
|
||||
"benchmark": "webpack --config ./webpack.config.js"
|
||||
"build": "mkdir -p dist && cp -f index.html dist/index.html && webpack --config ./webpack.config.js",
|
||||
"release": "yarn build && git checkout gh-pages && rm -rf ../../benchmarks && mv dist ../../benchmarks && git add -A && git commit -m \"Benchmarks deploy\" && git push origin gh-pages && git checkout -"
|
||||
},
|
||||
"dependencies": {
|
||||
"aphrodite": "1.2.5",
|
||||
|
||||
@@ -7,10 +7,10 @@ const appDirectory = path.resolve(__dirname);
|
||||
|
||||
module.exports = {
|
||||
context: __dirname,
|
||||
entry: ['babel-polyfill', './src/index'],
|
||||
entry: './src/index',
|
||||
output: {
|
||||
path: path.resolve(appDirectory, 'dist'),
|
||||
filename: 'performance.bundle.js'
|
||||
filename: 'bundle.js'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
|
||||
Reference in New Issue
Block a user