From e6bac43e0ac7875f216f07d9e1a7ba9eba622d36 Mon Sep 17 00:00:00 2001 From: kitze <kristijan.mkd@gmail.com> Date: Fri, 4 Nov 2016 13:46:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=20revert=20readmes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 68 ++++-------------------------------------------- README_BACKUP.md | 7 ----- 2 files changed, 5 insertions(+), 70 deletions(-) delete mode 100644 README_BACKUP.md diff --git a/README.md b/README.md index f864b245305..92364c5fead 100644 --- a/README.md +++ b/README.md @@ -1,65 +1,7 @@ -# ☢ custom-react-scripts ☢ +# react-scripts -### ⚠️ Disclaimer: -> This is **not** a fork of ```create-react-app```. It's just a fork of ```react-scripts``` with simple babel/webpack modifications that can toggle extra features. +This package includes scripts and configuration used by [Create React App](https://github.com/facebookincubator/create-react-app). +Please refer to its documentation: -The reason for this fork's existence is explained better in [this Medium article](https://medium.com/@kitze/configure-create-react-app-without-ejecting-d8450e96196a). - -### 💡Features: -* Decorators -* babel-preset-stage-0 -* LESS -* SASS -* Stylus -* CSS modules - -**the features are optional and can be turned on/off individually* - -### ❔How to use it -```create-react-app my-app --scripts-version custom-react-scripts``` - -Modify the ```.env``` file in the root of the generated project, and add any of the configuration options below 👇 to enable that feature. - -The generated project comes with SASS, LESS, and CSS modules support by default, but you can remove them at any time by removing the options from the ```.env``` file. - -### 📝 Configuration options - -#### Styling -- ```REACT_APP_SASS=true``` - enable SASS support -- ```REACT_APP_LESS=true``` - enable LESS support -- ```REACT_APP_STYLUS=true``` - enable Stylus support -- ```REACT_APP_CSS_MODULES``` - enable CSS modules - -#### Babel -- ```REACT_APP_BABEL_STAGE_0=true``` - enable stage-0 Babel preset -- ```REACT_APP_DECORATORS=true``` - enable decorators support - -> ⚠️ Please note that the Babel features are highly experimental (especially stage-0) and still not a part of the ES specification. -> Use them at your own risk of breaking backwards compatibility if they don't make the final version of the spec. - -#### Others -- ```PORT=3015``` - change default port (supported in CRA by default) -- ```OPEN_BROWSER=false``` - don't open browser after running webpack server - -### 🤔 Why? -The ```create-react-app``` app doesn't allow user configuration and modifications for few reasons: - -* Some of the babel presets and plugins that people might use are experimental. If they're used in a project and then they don't make it in the ES spec, they will break backwards compatibility. -* It's hard to maintain code for all of these custom configurations that people want to use. - -But people still want to use some of these features, and they're either ejecting their CRA app, or just don't use ```create-react-app``` because they're *just* missing **X** feature. - -So instead of [searching npm](https://www.npmjs.com/search?q=react-scripts) for a ```react-scripts``` fork with the **X** feature you need, this fork provides support for all of these extra features with simply adding a line in the ```.env``` config. - -### How does it work? -The CRA team recently [added support](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-development-environment-variables-in-env) for an ```.env``` file in the root of the generated CRA project. - -From the original readme: -> To define permanent environment vairables, create a file called .env in the root of your project: -> REACT_APP_SECRET_CODE=abcdef - -I just added support for extra environment variables that actually turn on certain plugins, babel plugins, presets, and loaders in the webpack and babel configs of ```react-scripts```. - -### Future plans - -I will put all of my efforts into supporting this fork to be always on par with features with the newest ```create-react-app``` and ```react-scripts``` versions. +* [Getting Started](https://github.com/facebookincubator/create-react-app/blob/master/README.md#getting-started) – How to create a new app. +* [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. \ No newline at end of file diff --git a/README_BACKUP.md b/README_BACKUP.md deleted file mode 100644 index 92364c5fead..00000000000 --- a/README_BACKUP.md +++ /dev/null @@ -1,7 +0,0 @@ -# react-scripts - -This package includes scripts and configuration used by [Create React App](https://github.com/facebookincubator/create-react-app). -Please refer to its documentation: - -* [Getting Started](https://github.com/facebookincubator/create-react-app/blob/master/README.md#getting-started) – How to create a new app. -* [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. \ No newline at end of file