From 9f24ca7270b876a4e4d8e7871ceedd68a5ab05b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20L=C3=B3pez?= Date: Fri, 7 Sep 2018 11:00:18 +0200 Subject: [PATCH] Add `web-tooling-benchmark-generator` `web-tooling-benchmark-generator` is a CLI tool to generate new benchmarks. Closes #49. --- CONTRIBUTING.md | 2 ++ package.json | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 783cbeee..5bf25053 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,6 +36,8 @@ There's no formal test suite yet. For now the process is roughly: - [ ] `npm install --save-exact` any necessary dependencies, and be sure to include the `package.json` changes in your pull request. - [ ] Put any assets used by the benchmark into the `third_party` folder and hook them up with the virtual file system in `src/vfs.js`. +Many of the steps above can be automated with the `npm run new-benchmark` script. It uses [`wtb-generate`](https://github.com/alopezsanchez/web-tooling-benchmark-generator), which is a CLI tool that automates some repetitive task when creating new benchmarks. + ## Sign the CLA Before we can use your code you have to sign the [Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual), which you can do online. This is mainly because you own the copyright to your changes, even after your contribution becomes part of our codebase, so we need your permission to use and distribute your code. We also need to be sure of various other things, for instance that you’ll tell us if you know that your code infringes on other people’s patents. You don’t have to do this until after you’ve submitted your code for review and a member has approved it, but you will have to do it before we can put your code into our codebase. diff --git a/package.json b/package.json index 6dbfa047..b3f3bb3e 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "postinstall": "npm run build:terser-bundled && npm run build:uglify-js-bundled && npm run build", "precommit": "node tools/hooks/pre-commit.js && lint-staged", "test": "jest", - "update-lock": "npm install --package-lock" + "update-lock": "npm install --package-lock", + "new-benchmark": "wtb-generate" }, "lint-staged": { "src/**/*.css": [ @@ -74,6 +75,7 @@ "os-browserify": "^0.3.0", "raw-loader": "github:bmeurer/raw-loader#escape", "semver": "^5.5.0", + "web-tooling-benchmark-generator": "^1.0.2", "webpack": "^3.8.1" } }