{"id":13480129,"url":"https://github.com/geowarin/tarec","last_synced_at":"2025-04-08T18:32:59.798Z","repository":{"id":57376462,"uuid":"57948987","full_name":"geowarin/tarec","owner":"geowarin","description":"The Awesome REact Cli","archived":false,"fork":false,"pushed_at":"2019-05-13T07:42:05.000Z","size":871,"stargazers_count":54,"open_issues_count":1,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-23T17:12:43.709Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://geowarin.github.io/tarec/","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geowarin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-03T07:11:16.000Z","updated_at":"2022-10-07T09:59:29.000Z","dependencies_parsed_at":"2022-09-12T20:23:43.173Z","dependency_job_id":null,"html_url":"https://github.com/geowarin/tarec","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geowarin%2Ftarec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geowarin%2Ftarec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geowarin%2Ftarec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geowarin%2Ftarec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geowarin","download_url":"https://codeload.github.com/geowarin/tarec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247902687,"owners_count":21015495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T17:00:34.945Z","updated_at":"2025-04-08T18:32:54.789Z","avatar_url":"https://github.com/geowarin.png","language":"JavaScript","readme":"![Tarec logo](img/logo.png)\n\n# The Awesome REact CLI\n\n![Not maintained](https://img.shields.io/badge/maintained%3F-no!-red.svg?style=flat)\n[![npm](https://img.shields.io/npm/v/tarec.svg)](https://www.npmjs.com/package/tarec)\n[![Build Status](https://travis-ci.org/geowarin/tarec.svg?branch=master)](https://travis-ci.org/geowarin/tarec)\n[![Coverage Status](https://coveralls.io/repos/github/geowarin/tarec/badge.svg?branch=master)](https://coveralls.io/github/geowarin/tarec?branch=master)\n\nTarec takes care of your React build for you. No more googling and stitching boilerplates together. Just write your application.\n\n# NO LONGER MAINTAINED\n\nI recommend using [create-react-app](https://github.com/facebookincubator/create-react-app) or [nwb](https://github.com/insin/nwb) instead.\n\nIf you like this project and whish to take over, ping me on [twitter](https://twitter.com/geowarin).\n\n## Features\n\nTarec takes all the best practices in the React community and makes them available to you via a Command-Line Interface (CLI).\n\n* Instant project generation\n* Babel 6 stage 0\n* Great developer experience with webpack errors analysis and desktop notifications\n* Tree-shaking with webpack 2\n* Hot reloading with react-hmr\n* Great DX experience with build notifications and clean error messages\n* Pre-configured loaders for all resources (images, fonts, json, ...)\n* Separate bundles for vendors and your code (css and js)\n* Cache-busting\n* Static resources\n* Index.html fallback (for the router)\n* Simple babel aliases configuration\n* Simple plugins system to add support for sass or mocha\n* Publish on github pages\n* Support [DLLs](http://engineering.invisionapp.com/post/optimizing-webpack/) for faster development\n* Mutithreaded compilation with [happypack](https://github.com/amireh/happypack)\n\n## Documentation\n\nRead [the documentation](http://geowarin.github.io/tarec/)\n\n## How-to\n\n1. `npm install -g tarec`\n2. `mkdir my-react-app \u0026\u0026 cd my-react-app`\n3. `tarec init`\n3. `npm install`\n4. `tarec start`\n\nUse `tarec start` to launch a dev-server with hot-reload and `tarec build` to generate the optimized version of your application\nin the `dist` folder.\n\n## Requirements\n\nNode 6+ and npm 3+.\n\n## Configuration\n\n### index.html\n\nIf no `index.html` is found at the root of your project, one will be generated for you.\nIf you provide one, css and scripts will be injected for you,\nas described in the [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin).\n\n### Static resources\n\nAll the files in the `public` directory of your project will be served by the dev server and will be copied\nas-is int the `dist` directory.\n\n### Happypack\n\n[Happypack](https://github.com/amireh/happypack) will build your css and js file by file in parallel, which\ncan decrease your build time in development.\n\nBy default, happypack is disabled. You can enable it with a command-line flage (`tarec start --happy`) or\nconfigure it in your `tarec.yml` file:\n\n```yml\nhappypack:\n  enabled: true    # default = false\n  cache: true       # default = true\n  cpus: 4             # default = os.cpus().length\n```\n\nHappypack is only used in development mode.\n\n### Notifications\n\nBy default, tarec will display an os notification on build errors.\nThis can be very handy because you don't always have the console visible when coding.\nBut if you are annoyed by this feature, you can disable it:\n\n```yml\nbuild:\n  # show notifications on build failure. Default, true\n  showNotification: true\n```\n\n![Build error notifications](http://i.imgur.com/BBQKfC4.gif)\n\n### Babel aliases\n\nCreate a `tarec.yml` file and configure [aliases](https://github.com/tleunen/babel-plugin-module-alias) like this:\n\n```yaml\n\naliases:\n  - components: ./src/components\n  - reducers: ./src/reducers\n\n```\n\n### Proxies\n\nIf you are targeting an api running on a different port or another host, it can be useful to create a proxy in development.\n\nYou can add as many proxies as you want in your `tarec.yml` file:\n\n```yaml\n\nproxies:\n  - /api: http://localhost:8080\n\n```\n\nThe above configuration will redirect every request made to `${yourServerUrl}/api` to `http://localhost:8080/api`\n\nThis enables websocket support and adds the host to the origin headers.\nSee [the options](https://github.com/chimurai/http-proxy-middleware#http-proxy-options) of `http-proxy-middleware`\nwhich is used here.\n\nIf the defaults are not good enough for you, you can override them:\n\n```yaml\nproxies:\n  - /api: http://localhost:8080\n  - path: /complex/route\n    target: ${REDIRECT_TARGET:http://google.nl}\n    prependPath: false\n    ws: false\n    pathRewrite:\n      '^/old/path' : '/newPath'\n```\n\n### Variable definitions\n\nIn your build process, it can be useful to define variables that will be available\nfrom your application.\n\nFor instance, we can define an `API_URL` variable in the `tarec.yml` file:\n\n```yaml\ndefine:\n  - API_URL: http://localhost:8080\n  - API_URL2: ${ENV_VAR:http://localhost:9090}\n```\n\nIn the above example, API_URL will be resolved as a string whose value is always\n`http://localhost:8080`.\n\nWe can now use the variable directly in our application:\n\n```javascript\nconsole.log(API_URL);\n```\n\n`API_URL2` will take its value from an environment variables.\nSee below.\n\n### Environment variables\n\nYou can use environment variables anywhere in the configuration file.\n\nSyntax:\n\n```\n${MY_VARIABLE:defaultValue}\n```\n\nExample:\n\n```yaml\ndefine:\n  - PREFIX: ${API_URL:http://localhost:9090}\n```\n\nIf the environment variable called `API_URL` is defined,\n`PREFIX` will take its value.\nOtherwise, the default value `http://localhost:9090` will be used.\n\n### DLLs\n\nWhen you start your application in development mode, webpack will go through every asset and library to resolve the imports\nyou wrote.\nWhile your code changes on a regular basis, your dependencies do not.\nIt is thus wasteful to re-link them on every build.\n\n[DLLs](http://engineering.invisionapp.com/post/optimizing-webpack/) solve that problem by allowing you to pre-bundle\nall your dependencies in a single js file. A manifest file will also be generated so webpack knows how to wire\nthose dependencies to your code.\n\nEvery time your dependencies change, run `tarec dll` to regenerate your project's dlls.\nThey will be put in the `.tarec/dll` folder, at the root of your project.\n\nWhen tarec starts (`tarec start`), it will look in this directory and automatically pick up those dlls.\nWebpack will therefore only compile your own code.\n\nOn projects with lots of dependencies, this call yield a very significant performance boost on both startup and\nrebuild time.\n\nDLLs are only used in development mode.\n\n### Plugins\n\nTarec has a powerful, yet simple plugin system.\nPlugins can add new commands or modify existing commands.\n\nFor instance, [tarec-plugin-mocha-test](https://github.com/geowarin/tarec-plugin-mocha-test) adds support for mocha\nand [tarec-plugin-sass](https://github.com/geowarin/tarec-plugin-sass) adds support for sass.\n\nTo use a plugin, install them as devDependencies and add them to your `tarec.yml` configuration file:\n\n```yaml\n\nplugins:\n  - tarec-plugin-mocha-test\n  - tarec-plugin-sass\n\n```\n\nYou can also resolve local plugins:\n\n\n```yaml\n\nplugins:\n  - ./myAwesomePlugin.js\n\n```\n\n## Todo\n\n* React-Hot-Loader 3?\n* Support server compilation and universal apps\n* Typescript\n\n# Thanks\n\n[@mrasoahaingo](https://github.com/mrasoahaingo) for the logo!\n","funding_links":[],"categories":["Alternatives"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeowarin%2Ftarec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeowarin%2Ftarec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeowarin%2Ftarec/lists"}