The Awesome REact Cli
Last updated 4 years ago by geowarin .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install tarec 
SYNC missed versions from official npm registry.

Tarec logo

The Awesome REact CLI

npm Build Status Coverage Status

Tarec takes care of your React build for you. No more googling and stitching boilerplates together. Just write your application.


Tarec takes all the best practices in the React community and makes them available to you via a Command-Line Interface (CLI).

  • Instant project generation
  • Babel 6 stage 0
  • Great developer experience with webpack errors analysis and desktop notifications
  • Tree-shaking with webpack 2
  • Hot reloading with react-hmr
  • Great DX experience with build notifications and clean error messages
  • Pre-configured loaders for all resources (images, fonts, json, ...)
  • Separate bundles for vendors and your code (css and js)
  • Cache-busting
  • Static resources
  • Index.html fallback (for the router)
  • Simple babel aliases configuration
  • Simple plugins system to add support for sass or mocha
  • Publish on github pages
  • Support DLLs for faster development
  • Mutithreaded compilation with happypack


Read the documentation


  1. npm install -g tarec
  2. mkdir my-react-app && cd my-react-app
  3. tarec init
  4. npm install
  5. tarec start

Use tarec start to launch a dev-server with hot-reload and tarec build to generate the optimized version of your application in the dist folder.


Node 6+ and npm 3+.



If no index.html is found at the root of your project, one will be generated for you. If you provide one, css and scripts will be injected for you, as described in the html-webpack-plugin.

Static resources

All the files in the public directory of your project will be served by the dev server and will be copied as-is int the dist directory.


Happypack will build your css and js file by file in parallel, which can decrease your build time in development.

By default, happypack is disabled. You can enable it with a command-line flage (tarec start --happy) or configure it in your tarec.yml file:

  enabled: true    # default = false
  cache: true       # default = true
  cpus: 4             # default = os.cpus().length

Happypack is only used in development mode.


By default, tarec will display an os notification on build errors. This can be very handy because you don't always have the console visible when coding. But if you are annoyed by this feature, you can disable it:

  # show notifications on build failure. Default, true
  showNotification: true

Build error notifications

Babel aliases

Create a tarec.yml file and configure aliases like this:

  - components: ./src/components
  - reducers: ./src/reducers


If you are targeting an api running on a different port or another host, it can be useful to create a proxy in development.

You can add as many proxies as you want in your tarec.yml file:

  - /api: http://localhost:8080

The above configuration will redirect every request made to ${yourServerUrl}/api to http://localhost:8080/api

This enables websocket support and adds the host to the origin headers. See the options of http-proxy-middleware which is used here.

If the defaults are not good enough for you, you can override them:

  - /api: http://localhost:8080
  - path: /complex/route
    target: ${REDIRECT_TARGET:http://google.nl}
    prependPath: false
    ws: false
      '^/old/path' : '/newPath'

Variable definitions

In your build process, it can be useful to define variables that will be available from your application.

For instance, we can define an API_URL variable in the tarec.yml file:

  - API_URL: http://localhost:8080
  - API_URL2: ${ENV_VAR:http://localhost:9090}

In the above example, API_URL will be resolved as a string whose value is always http://localhost:8080.

We can now use the variable directly in our application:


API_URL2 will take its value from an environment variables. See below.

Environment variables

You can use environment variables anywhere in the configuration file.




  - PREFIX: ${API_URL:http://localhost:9090}

If the environment variable called API_URL is defined, PREFIX will take its value. Otherwise, the default value http://localhost:9090 will be used.


When you start your application in development mode, webpack will go through every asset and library to resolve the imports you wrote. While your code changes on a regular basis, your dependencies do not. It is thus wasteful to re-link them on every build.

DLLs solve that problem by allowing you to pre-bundle all your dependencies in a single js file. A manifest file will also be generated so webpack knows how to wire those dependencies to your code.

Every time your dependencies change, run tarec dll to regenerate your project's dlls. They will be put in the .tarec/dll folder, at the root of your project.

When tarec starts (tarec start), it will look in this directory and automatically pick up those dlls. Webpack will therefore only compile your own code.

On projects with lots of dependencies, this call yield a very significant performance boost on both startup and rebuild time.

DLLs are only used in development mode.


Tarec has a powerful, yet simple plugin system. Plugins can add new commands or modify existing commands.

For instance, tarec-plugin-mocha-test adds support for mocha and tarec-plugin-sass adds support for sass.

To use a plugin, install them as devDependencies and add them to your tarec.yml configuration file:

  - tarec-plugin-mocha-test
  - tarec-plugin-sass

You can also resolve local plugins:

  - ./myAwesomePlugin.js


  • React-Hot-Loader 3?
  • Support server compilation and universal apps
  • Typescript


@mrasoahaingo for the logo!

Current Tags

  • 1.4.1                                ...           latest (4 years ago)

44 Versions

  • 1.4.1                                ...           4 years ago
  • 1.4.0                                ...           4 years ago
  • 1.3.2                                ...           4 years ago
  • 1.3.1                                ...           4 years ago
  • 1.3.0                                ...           4 years ago
  • 1.2.4                                ...           4 years ago
  • 1.2.3                                ...           4 years ago
  • 1.2.2                                ...           4 years ago
  • 1.2.1                                ...           4 years ago
  • 1.2.0                                ...           4 years ago
  • 1.1.3                                ...           4 years ago
  • 1.1.2                                ...           4 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
  • 1.0.0-beta.25                                ...           4 years ago
  • 1.0.0-beta.24                                ...           4 years ago
  • 1.0.0-beta.23                                ...           4 years ago
  • 1.0.0-beta.22                                ...           4 years ago
  • 1.0.0-beta.21                                ...           4 years ago
  • 1.0.0-beta.20                                ...           4 years ago
  • 1.0.0-beta.19                                ...           4 years ago
  • 1.0.0-beta.18                                ...           4 years ago
  • 1.0.0-beta.17                                ...           4 years ago
  • 1.0.0-beta.16                                ...           4 years ago
  • 1.0.0-beta.15                                ...           4 years ago
  • 1.0.0-beta.14                                ...           4 years ago
  • 1.0.0-beta.13                                ...           4 years ago
  • 1.0.0-beta.12                                ...           4 years ago
  • 1.0.0-beta.11                                ...           4 years ago
  • 1.0.0-beta.10                                ...           4 years ago
  • 1.0.0-beta.9                                ...           4 years ago
  • 1.0.0-beta.8                                ...           4 years ago
  • 1.0.0-beta.7                                ...           4 years ago
  • 1.0.0-beta.6                                ...           4 years ago
  • 1.0.0-beta.5                                ...           4 years ago
  • 1.0.0-beta.4                                ...           4 years ago
  • 1.0.0-beta.3                                ...           4 years ago
  • 1.0.0-beta.2                                ...           4 years ago
  • 1.0.0-beta.1                                ...           4 years ago
  • 1.0.0-alpha.1                                ...           4 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 44
Dev Dependencies (12)
Dependents (0)

Copyright 2014 - 2017 © taobao.org |