@gabehayes/react-scripts
Scripts and configuration for Universal React Applications
Last updated 2 years ago by gabehayes .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @gabehayes/react-scripts 
SYNC missed versions from official npm registry.

React Scripts

This repository exposes the react-scripts binary, a small set of tools that handles configuration and time-consuming tasks for you.

Table of Contents

Installation

Just a matter of cloning the repository and installing dependencies:

yarn install

Development

When you start the app, any changes you make will be automatically compiled.

yarn start

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:

yarn link

Then, from the other project's path:

yarn link @gabehayes/react-scripts

Scripts

analyze

react-scripts analyze

Will output a stats.json file that contains bundle statistics. Useful in tandem with a tool such as Webpack Visualizer.

build

react-scripts build

Bundles the application, optimized for best performance in a production environment.

The build is minified and the filenames include hashes.

codegen

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.

start

react-scripts start

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.

test

react-scripts test

Launches the test runner in the interactive watch mode.

translate

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 src/i18n/localizable.csv.

Current Tags

  • 0.16.0                                ...           latest (2 years ago)

4 Versions

  • 0.16.0                                ...           2 years ago
  • 0.15.1                                ...           2 years ago
  • 0.15.0                                ...           2 years ago
  • 0.14.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 8
Last Day 0
Last Week 8
Last Month 1
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |