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
- Tree-shaking with webpack 2
- Hot reloading with react-hmr
- 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
Read the documentation
npm install -g tarec
mkdir my-react-app && cd my-react-app
tarec init
npm install
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.
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.
Create a tarec.yml
file and configure aliases like this:
aliases:
- 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:
proxies:
- /api: http://localhost:8080
The above configuration will redirect every request made to ${yourServerUrl}/api
to http://localhost:8080/api
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:
plugins:
- tarec-plugin-mocha-test
- tarec-plugin-sass
You can also resolve local plugins:
plugins:
- ./myAwesomePlugin.js
- Configuration file and command-line switches
- React-Hot-Loader 3?