Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Commit d688c60

Browse files
author
William Monk
committed
Update Readme
1 parent aa3e284 commit d688c60

File tree

1 file changed

+39
-226
lines changed

1 file changed

+39
-226
lines changed

README.md

+39-226
Original file line numberDiff line numberDiff line change
@@ -1,251 +1,64 @@
1-
# Create React App [![Build Status](https://travis-ci.org/facebookincubator/create-react-app.svg?branch=master)](https://travis-ci.org/facebookincubator/create-react-app)
1+
# `react-scripts-ts` [![npm version](https://badge.fury.io/js/react-scripts-ts.svg)](https://badge.fury.io/js/react-scripts-ts)
22

3-
Create React apps with no build configuration.
3+
Create React apps (with Typescript) with no build configuration.
44

5-
* [Getting Started](#getting-started) – How to create a new app.
6-
* [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
5+
_Do you know react and want to try out typescript? Or do you know typescript and want to try out react?_ Get all the benefits from `create-react-app` but you use typescript! 🚀
76

8-
Create React App works on macOS, Windows, and Linux.<br>
9-
If something doesn’t work please [file an issue](https://github.com/facebookincubator/create-react-app/issues/new).
10-
11-
## Quick Overview
7+
## tl;dr
128

139
```sh
1410
npm install -g create-react-app
1511

16-
create-react-app my-app
12+
create-react-app my-app --scripts-version=react-scripts-ts
1713
cd my-app/
1814
npm start
1915
```
2016

21-
Then open [http://localhost:3000/](http://localhost:3000/) to see your app.<br>
22-
When you’re ready to deploy to production, create a minified bundle with `npm run build`.
23-
24-
<img src='https://camo.githubusercontent.com/506a5a0a33aebed2bf0d24d3999af7f582b31808/687474703a2f2f692e696d6775722e636f6d2f616d794e66434e2e706e67' width='600' alt='npm start'>
25-
26-
### Get Started Immediately
27-
28-
You **don’t** need to install or configure tools like Webpack or Babel.<br>
29-
They are preconfigured and hidden so that you can focus on the code.
30-
31-
Just create a project, and you’re good to go.
32-
33-
## Getting Started
34-
35-
### Installation
36-
37-
Install it once globally:
38-
39-
```sh
40-
npm install -g create-react-app
41-
```
42-
43-
**You’ll need to have Node >= 6 on your machine**. You can use [nvm](https://github.com/creationix/nvm#usage) to easily switch Node versions between different projects.
44-
45-
**This tool doesn’t assume a Node backend**. The Node installation is only required for Create React App itself.
46-
47-
### Creating an App
48-
49-
To create a new app, run:
50-
51-
```sh
52-
create-react-app my-app
53-
cd my-app
54-
```
55-
56-
It will create a directory called `my-app` inside the current folder.<br>
57-
Inside that directory, it will generate the initial project structure and install the transitive dependencies:
58-
59-
```
60-
my-app/
61-
README.md
62-
node_modules/
63-
package.json
64-
.gitignore
65-
public/
66-
favicon.ico
67-
index.html
68-
src/
69-
App.css
70-
App.js
71-
App.test.js
72-
index.css
73-
index.js
74-
logo.svg
75-
```
76-
77-
No configuration or complicated folder structures, just the files you need to build your app.<br>
78-
Once the installation is done, you can run some commands inside the project folder:
79-
80-
### `npm start` or `yarn start`
81-
82-
Runs the app in development mode.<br>
83-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
84-
85-
The page will reload if you make edits.<br>
86-
You will see the build errors and lint warnings in the console.
87-
88-
<img src='https://camo.githubusercontent.com/41678b3254cf583d3186c365528553c7ada53c6e/687474703a2f2f692e696d6775722e636f6d2f466e4c566677362e706e67' width='600' alt='Build errors'>
89-
90-
### `npm test` or `yarn test`
91-
92-
Runs the test watcher in an interactive mode.<br>
93-
By default, runs tests related to files changed since the last commit.
94-
95-
[Read more about testing.](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#running-tests)
96-
97-
### `npm run build` or `yarn build`
98-
99-
Builds the app for production to the `build` folder.<br>
100-
It correctly bundles React in production mode and optimizes the build for the best performance.
101-
102-
The build is minified and the filenames include the hashes.<br>
103-
By default, it also [includes a service worker](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app) so that your app loads from local cache on future visits.
104-
105-
Your app is ready to be deployed.
106-
107-
## User Guide
108-
109-
The [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md) includes information on different topics, such as:
110-
111-
- [Updating to New Releases](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#updating-to-new-releases)
112-
- [Folder Structure](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#folder-structure)
113-
- [Available Scripts](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#available-scripts)
114-
- [Supported Language Features and Polyfills](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#supported-language-features-and-polyfills)
115-
- [Syntax Highlighting in the Editor](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#syntax-highlighting-in-the-editor)
116-
- [Displaying Lint Output in the Editor](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#displaying-lint-output-in-the-editor)
117-
- [Debugging in the Editor](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#debugging-in-the-editor)
118-
- [Changing the Page `<title>`](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#changing-the-page-title)
119-
- [Installing a Dependency](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#installing-a-dependency)
120-
- [Importing a Component](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#importing-a-component)
121-
- [Code Splitting](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#code-splitting)
122-
- [Adding a Stylesheet](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-stylesheet)
123-
- [Post-Processing CSS](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#post-processing-css)
124-
- [Adding a CSS Preprocessor (Sass, Less etc.)](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-css-preprocessor-sass-less-etc)
125-
- [Adding Images, Fonts, and Files](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-images-fonts-and-files)
126-
- [Using the `public` Folder](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-the-public-folder)
127-
- [Using Global Variables](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-global-variables)
128-
- [Adding Bootstrap](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-bootstrap)
129-
- [Adding Flow](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-flow)
130-
- [Adding Custom Environment Variables](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-custom-environment-variables)
131-
- [Can I Use Decorators?](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#can-i-use-decorators)
132-
- [Integrating with an API Backend](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#integrating-with-an-api-backend)
133-
- [Proxying API Requests in Development](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#proxying-api-requests-in-development)
134-
- [Using HTTPS in Development](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-https-in-development)
135-
- [Generating Dynamic `<meta>` Tags on the Server](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#generating-dynamic-meta-tags-on-the-server)
136-
- [Pre-Rendering into Static HTML Files](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#pre-rendering-into-static-html-files)
137-
- [Running Tests](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#running-tests)
138-
- [Making a Progressive Web App](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app)
139-
- [Deployment](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#deployment)
140-
- [Advanced Configuration](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration)
141-
- [Troubleshooting](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#troubleshooting)
142-
143-
A copy of the user guide will be created as `README.md` in your project folder.
144-
145-
## How to Update to New Versions?
146-
147-
Please refer to the [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#updating-to-new-releases) for this and other information.
148-
149-
## Philosophy
150-
151-
* **One Dependency:** There is just one build dependency. It uses Webpack, Babel, ESLint, and other amazing projects, but provides a cohesive curated experience on top of them.
152-
153-
* **No Configuration Required:** You don't need to configure anything. Reasonably good configuration of both development and production builds is handled for you so you can focus on writing code.
154-
155-
* **No Lock-In:** You can “eject” to a custom setup at any time. Run a single command, and all the configuration and build dependencies will be moved directly into your project, so you can pick up right where you left off.
156-
157-
## Why Use This?
158-
159-
**If you’re getting started** with React, use `create-react-app` to automate the build of your app. There is no configuration file, and `react-scripts` is the only extra build dependency in your `package.json`. Your environment will have everything you need to build a modern React app:
160-
161-
* React, JSX, ES6, and Flow syntax support.
162-
* Language extras beyond ES6 like the object spread operator.
163-
* A dev server that lints for common errors.
164-
* Import CSS and image files directly from JavaScript.
165-
* Autoprefixed CSS, so you don’t need `-webkit` or other prefixes.
166-
* A `build` script to bundle JS, CSS, and images for production, with sourcemaps.
167-
* An offline-first [service worker](https://developers.google.com/web/fundamentals/getting-started/primers/service-workers) and a [web app manifest](https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/), meeting all the [Progressive Web App](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app) criteria.
168-
169-
**The feature set is intentionally limited**. It doesn’t support advanced features such as server rendering or CSS modules. The tool is also **non-configurable** because it is hard to provide a cohesive experience and easy updates across a set of tools when the user can tweak anything.
170-
171-
**You don’t have to use this.** Historically it has been easy to [gradually adopt](https://www.youtube.com/watch?v=BF58ZJ1ZQxY) React. However many people create new single-page React apps from scratch every day. We’ve heard [loud](https://medium.com/@ericclemmons/javascript-fatigue-48d4011b6fc4) and [clear](https://twitter.com/thomasfuchs/status/708675139253174273) that this process can be error-prone and tedious, especially if this is your first JavaScript build stack. This project is an attempt to figure out a good way to start developing React apps.
172-
173-
### Converting to a Custom Setup
174-
175-
**If you’re a power user** and you aren’t happy with the default configuration, you can “eject” from the tool and use it as a boilerplate generator.
176-
177-
Running `npm run eject` copies all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. Commands like `npm start` and `npm run build` will still work, but they will point to the copied scripts so you can tweak them. At this point, you’re on your own.
178-
179-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
180-
181-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
182-
183-
## Limitations
184-
185-
Some features are currently **not supported**:
186-
187-
* Server rendering.
188-
* Some experimental syntax extensions (e.g. decorators).
189-
* CSS Modules.
190-
* Importing LESS or Sass directly ([but you still can use them](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-css-preprocessor-sass-less-etc)).
191-
* Hot reloading of components.
192-
193-
Some of them might get added in the future if they are stable, are useful to majority of React apps, don’t conflict with existing tools, and don’t introduce additional configuration.
194-
195-
## What’s Inside?
196-
197-
The tools used by Create React App are subject to change.
198-
Currently it is a thin layer on top of many amazing community projects, such as:
199-
200-
* [webpack](https://webpack.github.io/) with [webpack-dev-server](https://github.com/webpack/webpack-dev-server), [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin) and [style-loader](https://github.com/webpack/style-loader)
201-
* [Babel](http://babeljs.io/) with ES6 and extensions used by Facebook (JSX, [object spread](https://github.com/sebmarkbage/ecmascript-rest-spread/commits/master), [class properties](https://github.com/jeffmo/es-class-public-fields))
202-
* [Autoprefixer](https://github.com/postcss/autoprefixer)
203-
* [ESLint](http://eslint.org/)
204-
* [Jest](http://facebook.github.io/jest)
205-
* and others.
17+
## Features
20618

207-
All of them are transitive dependencies of the provided npm package.
19+
### Code highlighting on error
20+
When you run `npm run build` the terminal will output the error, including the highlighted sourecode (like babel)!
20821

209-
## Contributing
22+
![CodeHighlight](https://cloud.githubusercontent.com/assets/175278/22310149/1ee66ccc-e346-11e6-83ff-e3a053701fb4.gif)
21023

211-
We'd love to have your helping hand on `create-react-app`! See [CONTRIBUTING.md](CONTRIBUTING.md) for more information on what we're looking for and how to get started.
24+
## Changelog
21225

213-
## React Native
26+
### 2.0.0
27+
* Upgrade to [`[email protected]`](https://github.com/facebookincubator/create-react-app/blob/0d1521aabf5a0201ea1bcccc33e286afe048f820/CHANGELOG.md)
21428

215-
Looking for something similar, but for React Native?<br>
216-
Check out [Create React Native App](https://github.com/react-community/create-react-native-app/).
29+
### 1.4.0
30+
* Upgrade to [email protected] - thanks to @patrick91
31+
* Add tests around react-scripts-ts - thanks to @migerh
21732

218-
## Acknowledgements
33+
### 1.3.0
34+
* Upgrade to [email protected] - thanks to @jeremistadler
21935

220-
We are grateful to the authors of existing related projects for their ideas and collaboration:
36+
### 1.1.8
37+
* Fix regression where no `@types` were being installed on init
22138

222-
* [@eanplatter](https://github.com/eanplatter)
223-
* [@insin](https://github.com/insin)
224-
* [@mxstbr](https://github.com/mxstbr)
39+
### 1.1.7
40+
* Merge facebookincubator/[email protected] into react-scripts-ts
41+
* Merge facebookincubator/[email protected] into react-scripts-ts
42+
* Merge facebookincubator/[email protected] into react-scripts-ts
43+
* Merge facebookincubator/[email protected] into react-scripts-ts
44+
* Merge facebookincubator/[email protected] into react-scripts-ts
22545

226-
## Alternatives
46+
### 1.1.6
47+
* Merge facebookincubator/[email protected] into react-scripts-ts
22748

228-
If you don’t agree with the choices made in this project, you might want to explore alternatives with different tradeoffs.<br>
229-
Some of the more popular and actively maintained ones are:
49+
### 1.0.6
50+
* Add missing `cli-highlight` dependency
23051

231-
* [insin/nwb](https://github.com/insin/nwb)
232-
* [mozilla-neutrino/neutrino-dev](https://github.com/mozilla-neutrino/neutrino-dev)
233-
* [NYTimes/kyt](https://github.com/NYTimes/kyt)
234-
* [zeit/next.js](https://github.com/zeit/next.js)
235-
* [gatsbyjs/gatsby](https://github.com/gatsbyjs/gatsby)
52+
### 1.0.5
53+
* Print file names when running `npm run build`
54+
* Add support for `setupTest.ts`
55+
* Highlight source code when erroring in `npm run build`
23656

237-
Notable alternatives also include:
57+
### 1.0.4
58+
* Change mentions of `eslint` to `tslint`
23859

239-
* [enclave](https://github.com/eanplatter/enclave)
240-
* [motion](https://github.com/motion/motion)
241-
* [quik](https://github.com/satya164/quik)
242-
* [sagui](https://github.com/saguijs/sagui)
243-
* [roc](https://github.com/rocjs/roc)
244-
* [aik](https://github.com/d4rkr00t/aik)
245-
* [react-app](https://github.com/kriasoft/react-app)
246-
* [dev-toolkit](https://github.com/stoikerty/dev-toolkit)
247-
* [tarec](https://github.com/geowarin/tarec)
248-
* [sku](https://github.com/seek-oss/sku)
60+
### 1.0.3
61+
* Remove hidden character from `tsconfig.json`
24962

250-
You can also use module bundlers like [webpack](http://webpack.github.io) and [Browserify](http://browserify.org/) directly.<br>
251-
React documentation includes [a walkthrough](https://facebook.github.io/react/docs/package-management.html) on this topic.
63+
### 1.0.2
64+
* Copy `typescriptTransform.js` when running `npm run eject`

0 commit comments

Comments
 (0)