This repository exposes the
react-scripts binary, a small set of tools that handles configuration and time-consuming tasks for you.
Just a matter of cloning the repository and installing dependencies:
When you start the app, any changes you make will be automatically compiled.
Typically, you will want to link this as a dependency in another project to test your changes live.
To link this repository, you must first register this project as a linkable dependency. From this project path:
Then, from the other project's path:
yarn link @gabehayes/react-scripts
Will output a
stats.json file that contains bundle statistics. Useful in tandem with a tool such as Webpack Visualizer.
Bundles the application, optimized for best performance in a production environment.
The build is minified and the filenames include hashes.
react-scripts codegen <graphUrl>
You must pass this task a valid GraphQL endpoint (e.g.
react-scripts codegen https://graph.example.com/graphql).
It will generate a
schema.json file for linting GraphQL queries.
It will also generate a flow definition file in
flow-typed/schema.js.flow for statically typing queries.
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
react-scripts translate [--out, -o] [Output File]
This task uses babel-plugin-react-intl to extract translatable strings from your project.
All messages are extracted to the build path, then concatenated and transformed to a single
csv file, which is then written to the given output file path.
The output file can be changed with the
--out, -o option, which defaults to