From 84a4acaacf5207bca7d0427a616aebf910672085 Mon Sep 17 00:00:00 2001 From: Nikolai Tillmann Date: Thu, 6 Jul 2017 17:21:23 -0700 Subject: [PATCH 1/3] Giving choice - npm or yarn. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b63df12feb..40cdc4cb6c 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,10 @@ See the official [prepack.io](http://prepack.io) website for an introduction and ## How to use Prepack -Install the CLI via yarn, +Install the CLI via npm, ```bash -$ yarn global add prepack +$ npm install -g yarn ``` Or if you prefer yarn, From 2ec09254eee438ee8e4ef5d5fd6c9eb75506eedd Mon Sep 17 00:00:00 2001 From: Nikolai Tillmann Date: Fri, 7 Jul 2017 12:29:00 -0700 Subject: [PATCH 2/3] Fixing npm command. Pointing out that yarn is not optional for development work as many scripts require it. --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 40cdc4cb6c..156d243eac 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,15 @@ See the official [prepack.io](http://prepack.io) website for an introduction and Install the CLI via npm, +```bash +$ npm install -g prepack +``` + +Or if you prefer yarn, make sure you get yarn first, ```bash $ npm install -g yarn ``` -Or if you prefer yarn, +and then install the Prepack CLI via yarn: ```bash $ yarn global add prepack @@ -49,6 +54,8 @@ Detailed instructions and the API can be found at [Prepack CLI: Getting Started] 3. Get yarn and node, then do `yarn` +Note: For development work you really need `yarn`, as many scripts require it. + ### How to build, lint, type check 0. Get the code From 276f64233953a6dba9c09ef019061f50b3284e43 Mon Sep 17 00:00:00 2001 From: Nikolai Tillmann Date: Mon, 10 Jul 2017 12:41:51 -0700 Subject: [PATCH 3/3] Replace all `npm [run]` instances with `yarn` in package.json. --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index aff904183b..5bce925ea0 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "main": "lib/prepack-node.js", "browser": "lib/prepack-standalone.js", "scripts": { - "build": "babel src --out-dir lib --source-maps && npm run build-bundle", + "build": "babel src --out-dir lib --source-maps && yarn build-bundle", "build-scripts": "babel scripts --out-dir lib", "build-bundle": "webpack", "watch": "babel src scripts --out-dir lib --watch --source-maps", @@ -41,12 +41,12 @@ "test-error-handler-with-coverage": "./node_modules/.bin/istanbul cover ./lib/test-error-handler.js --dir coverage.error && ./node_modules/.bin/remap-istanbul -i coverage.error/coverage.json -o coverage-sourcemapped.error -t html", "test-node-cli-mode": "bash < scripts/test-node-cli-mode.sh", "test-std-in": "bash < scripts/test-std-in.sh", - "test": "npm run test-residual && npm run test-serializer && npm run test-sourcemaps && npm run test-test262 && npm run test-internal && npm run test-error-handler && npm run test-std-in", + "test": "yarn test-residual && yarn test-serializer && yarn test-sourcemaps && yarn test-test262 && yarn test-internal && yarn test-error-handler && yarn test-std-in", "repl": "node lib/repl-cli.js", "prepack": "node lib/prepack-cli.js", "prepack-prepack": "node --stack_size=10000 --max_old_space_size=8096 ./bin/prepack.js ./lib/prepack-cli.js --out ./lib/prepack-cli.prepacked.js --compatibility node-cli --mathRandomSeed rnd", - "validate": "npm run build && npm run build-scripts && npm run lint && npm run depcheck && npm run flow && npm test", - "prepublish": "npm run build", + "validate": "yarn build && yarn build-scripts && yarn lint && yarn depcheck && yarn flow && yarn test", + "prepublish": "yarn build", "depcheck": "babel-node scripts/detect_bad_deps.js", "prettier": "node ./scripts/prettier.js write-changed", "prettier-all": "node ./scripts/prettier.js write",