Yeoman generator for creating React applications
$ yarn global add yo
if you haven't installed Yeoman yet.$ yarn install
$ yarn build
$ yarn link
from this project's root directory to make the generator discoverable by Yeoman$ yo react-app
to run the generator - note: the generator does not work if you have uncommitted git files in the directory where the command is run.
Create React App takes awhile to run. When developing the generator, you can use a cached version of the Create React App boilerplate to speed up generation time.
$ yarn global add yo
if you haven't installed Yeoman yet.$ yarn install
$ yarn build
$ yarn link
from this project's root directory to make the generator discoverable by Yeoman$ yarn update:cra-cache
to load the CRA cache. Run again to update it if needed. Note: you cannot have uncommitted git files to run this script.$ yarn generate
to run the generator with the CRA cache targeting the/sample-react-app
directory
Some notes on working with Yeoman in ES6.
Even using the --cra-cache
flag can be a bit slow. The project uses recursive-copy. fs-extra had perforance issues. cpy, while more performant that recurive-copy, does not support recursion.
babel-plugin-add-module-exports
is needed for the old module.exports
functionality (see this issue).