{"_id":"@darraghmckay/cra-build-watch","_rev":"1-954dbb55bfd47cf1aae4d2b06c33a0c1","name":"@darraghmckay/cra-build-watch","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@darraghmckay/cra-build-watch","version":"0.0.1","description":"A script for create-react-app that writes development builds to the disk","main":"scripts/index.js","bin":{"cra-build-watch":"bin/cra-build-watch.js"},"engines":{"node":">=10.0.0"},"scripts":{"test":"jest","cm":"npx git-cz","travis-deploy-once":"travis-deploy-once","semantic-release":"semantic-release"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"lint-staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"lint-staged":{"{{bin,scripts,utils}/**/*.{js,json},*.{js,json}}":["prettier --write"]},"prettier":{"printWidth":100,"trailingComma":"es5","singleQuote":true},"release":{"branches":["+([0-9])?(.{+([0-9]),x}).x","master","next",{"name":"deploy","channel":false},"next-major",{"name":"beta","prerelease":true},{"name":"alpha","prerelease":true}]},"repository":{"type":"git","url":"git+https://github.com/Nargonath/cra-build-watch.git"},"bugs":{"url":"https://github.com/Nargonath/cra-build-watch/issues"},"homepage":"https://github.com/Nargonath/cra-build-watch#readme","author":{"name":"Nargonath","email":"jonas.pauthier@gmail.com"},"keywords":["create-react-app","react","webpack","development-environment","build","reactjs"],"license":"MIT","peerDependencies":{"react-scripts":">= 1.0.x","webpack":"^4.4.0 || ^5.0.0"},"devDependencies":{"@commitlint/cli":"11.0.0","@commitlint/config-conventional":"11.0.0","@dixeed/eslint-config":"2.0.0","cz-conventional-changelog":"3.3.0","eslint":"7.12.1","husky":"4.3.0","jest":"^26.6.1","lint-staged":"10.5.1","mini-css-extract-plugin":"^1.4.1","prettier":"2.1.2"},"dependencies":{"cross-spawn":"7.0.3","fs-extra":"^9.0.1","html-webpack-plugin":"^4.5.0","import-cwd":"3.0.0","meow":"8.0.0","ora":"4.0.3","semver":"^7.1.1","webpack":"^4.41.5"},"gitHead":"a8f82594739c04c48951b424bed230571db9c1fe","_id":"@darraghmckay/cra-build-watch@0.0.1","_nodeVersion":"15.1.0","_npmVersion":"7.0.8","dist":{"integrity":"sha512-ls6p9Oq70CyLWETsc3+6M0g+YtkPsDalDrOKi5xmBJG5UphYN97/L+6Yq6tHN0Rw3CmLrfFY0MVk6NKToJy8kw==","shasum":"8601185d8423cec32d56a5d3fd9807168bd4f911","tarball":"https://registry.npmjs.org/@darraghmckay/cra-build-watch/-/cra-build-watch-0.0.1.tgz","fileCount":8,"unpackedSize":19675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbwtSCRA9TVsSAnZWagAAVWAP/2g5Hgf3lpNUkdZ7/32K\nBkmYd3q1luSpNEmD1RwFNvTcm50Lp1YBTeqKmCRyH4TjEw6nu+vQv8/ZKzHO\nSuObKDlivHg9GgUu5LJ0iFMUp10cJdaG8VJtdCd0FhzGPNOMNQwgf9igLv4v\nxZbNy0I3EdY/049Phh/y1vVuqBenaQTRn+f3EGEacGcuUWI20N9rBMOvAa6I\nK9hY1nNC6Qz4s8UOsVh5x4DuWlOY7vhFCLZFEsL1GoCYVLTnEBicJ0Iyf5So\nCSnWfWn8CeoHnDNQ2D2y9xyfEN1/CwHdT7Mk/EL3V0lC9rup4VZtKg60cKBM\nNul62fNGmCC6eUZUhncGScIzYZrpwtdimBDBFd2RTgLS7WESfwUELYC07T54\n14o6rXIVeGrbil8UyOK768oE0DKXNbHhKrfRHOMsHQ3D5AgMRPFaodrYBpuY\nG5KmTfbfQXJKhXXaYTlmJqOAhgoxv8gOWg/V+69VxVbW2wSaHGPGWVvM3bfu\nG03Egu7Bab3rZ/svmNQOkhUcj7zplnvYJchHzj7qSAoGt4vBBWofQ+QNs1Yb\niXDIWYidz+Q2Fy+Xr+59pSjXKSH7yU3uFbg2DaTMYVZyEmFMstIa2qmpd5Ru\neZFQlymjiR8g0emqIEnt0IklHdfMyChL3bNGHSOGRhUDF/Xqk0Tn3iNT4N/9\n+YYq\r\n=aA6j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2UY6d1/MoCyjS5RZKKg3L+oieNkbdQO6d2H5aCfrcNgIgS2XennFcnrca14CFnZ8iPTaRt+JbvJU/ypO3kEWFplw="}]},"_npmUser":{"name":"darraghmckay","email":"darraghmckay@gmail.com"},"directories":{},"maintainers":[{"name":"darraghmckay","email":"darraghmckay@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cra-build-watch_0.0.1_1617890129978_0.6229689134738552"},"_hasShrinkwrap":false}},"time":{"created":"2021-04-08T13:55:29.921Z","0.0.1":"2021-04-08T13:55:30.105Z","modified":"2022-04-05T02:45:50.770Z"},"maintainers":[{"name":"darraghmckay","email":"darraghmckay@gmail.com"}],"description":"A script for create-react-app that writes development builds to the disk","homepage":"https://github.com/Nargonath/cra-build-watch#readme","keywords":["create-react-app","react","webpack","development-environment","build","reactjs"],"repository":{"type":"git","url":"git+https://github.com/Nargonath/cra-build-watch.git"},"author":{"name":"Nargonath","email":"jonas.pauthier@gmail.com"},"bugs":{"url":"https://github.com/Nargonath/cra-build-watch/issues"},"license":"MIT","readme":"<div align=\"center\">\n  <h1>cra-build-watch</h1>\n  <strong>A script for create-react-app that writes development builds to the disk</strong>\n</div>\n\n<hr>\n\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![Build Status](https://travis-ci.org/Nargonath/cra-build-watch.svg?branch=master)](https://travis-ci.org/Nargonath/twitter-auth-await)\n[![npm version](https://badge.fury.io/js/cra-build-watch.svg)](https://badge.fury.io/js/cra-build-watch)\n![dependabot](https://badgen.net/dependabot/dependabot/dependabot-core/?icon=dependabot)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n# Disclaimer\n\n**The builds resulting from this script are NOT for production environment.** They lack various optimizations.\n\nThis script is meant as a temporary workaround for `create-react-app` project based until this feature is built-in into `react-scripts`. See [create-react-app#1070](https://github.com/facebook/create-react-app/issues/1070).\n\nThis script is inspired by other work related such as: https://gist.github.com/jasonblanchard/ae0d2e304a647cd847c0b4493c2353d4.\n\n## Ejection\n\nYou **do not** need to eject your project for you to use `cra-build-watch`.\n\nThis tool handles ejected projects but it assumes you did not modify your `webpack.config.js` file, `paths.js` and `env.js` utils. If you did I cannot guarantee that this tool will work.\n\n# Why do I need this?\n\nAs of now (20/04/2018), `create-react-app` (more precisely `react-scripts`) does not allow development builds to be written to the disk because it uses `webpackDevServer` to serve your build files and folders ([for good reasons](https://github.com/facebook/create-react-app/issues/1070#issuecomment-261812303)). The problem is that in some cases you need to have these files written to the disk i.e:\n\n- Developing browser extensions using React.\n- Incorporating your React application into an existing application.\n- Serving your React app with a dedicated backend.\n\n# Prerequisites\n\nSupports `react-scripts >= 1.0.x`, hence it supports the newest version `4.x.x`.\n\nSupports `node >= 10`.\n\n# Installation\n\nAdd it to your project using `npm`:\n\n```\nnpm install -D cra-build-watch\n```\n\nor using `yarn`:\n\n```\nyarn add -D cra-build-watch\n```\n\n# Usage\n\nAdd a new script into your `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"watch\": \"cra-build-watch\"\n  }\n}\n```\n\nRun that script:\n\n```\nnpm run watch\n```\n\nwith Yarn:\n\n```\nyarn watch\n```\n\n# Configuration\n\nBy default the script will generate everything into `build/` at your project root and remove the public path from webpack's configuration.\n\nIf those defaults do not work for you, the script accepts some arguments:\n\n- `--after-initial-build-hook`: accepts a string of shell code that will be run only once after the initial build in the same process as the `cra-build-watch`.\n- `--after-rebuild-hook`: accepts a string of shell code that will be run every time webpack rebuilds your project after a filesystem change. It runs in the same process as `cra-build-watch`.\n- `-b|--build-path`: expects either an absolute or relative path. If a relative path is given it will be prefixed by your project root path.\n  - default: `yourProjectRoot/build`.\n- `--chunk-filename`: Set the naming you want to use for non-entry chunk files. Accepts webpack placeholders such as `[id]`, `[name]`, `[hash]`. Directories can be supplied.\n  - default: `js/bundle.js`.\n- `--disable-chunks`: disable code-splitting / chunks so that only a single bundle.js file is generated. It only works with `react-scripts` >= `2.0.0`.\n- `-o|--output-filename`: Set the name to be used for the output bundle. Accepts webpack placeholders such as `[id]`, `[name]`, `[hash]`. Directories can be supplied.\n  - default: `js/[name].chunk.js`\n- `--react-scripts-version`: expects the `react-scripts` version you are using in your project i.e `2.0.3`. If not given it will be implied from your `node_modules` and if it cannot be implied the version `2.1.2` will be the default. Consider setting it if you **ejected** and are not using the latest `react-scripts` version.\n- `--use-react-workspaces`: Use react-workspaces version of react-scripts instead of the normal react-scripts\n- `-p|--public-path`: expects a relative URL where `/` is the root. If you serve your files using an external webserver this argument is to match with your web server configuration. More information can be found in [webpack configuration guide](https://webpack.js.org/configuration/output/#output-publicpath).\n  - default: \"\".\n- `-v|--verbose`: display webpack build output.\n\n# Contributions\n\nAll contributions are welcomed.\n","readmeFilename":"README.md"}