diff --git a/README.md b/README.md index b63df12feb..156d243eac 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,17 @@ 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 prepack ``` -Or if you prefer yarn, + +Or if you prefer yarn, make sure you get yarn first, +```bash +$ npm install -g 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 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",