Skip to content

Commit 4670103

Browse files
committed
[BPK-2599]: Backpackify
1 parent 6c009ed commit 4670103

File tree

32 files changed

+2067
-368
lines changed

32 files changed

+2067
-368
lines changed

.travis.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
dist: trusty
3+
language: node_js
4+
node_js:
5+
- 10
6+
- 12
7+
cache:
8+
yarn: true
9+
directories:
10+
- .npm
11+
before_install:
12+
- curl -o- -L https://yarnpkg.com/install.sh | bash -s
13+
- export PATH="$HOME/.yarn/bin:$PATH"
14+
install: true
15+
script:
16+
- 'if [ $TEST_SUITE = "simple" ]; then tasks/e2e-simple.sh; fi'
17+
- 'if [ $TEST_SUITE = "installs" ]; then tasks/e2e-installs.sh; fi'
18+
- 'if [ $TEST_SUITE = "kitchensink" ]; then tasks/e2e-kitchensink.sh; fi'
19+
- 'if [ $TEST_SUITE = "kitchensink-eject" ]; then tasks/e2e-kitchensink-eject.sh; fi'
20+
- 'if [ $TEST_SUITE = "old-node" ]; then tasks/e2e-old-node.sh; fi'
21+
- 'if [ $TEST_SUITE = "behavior" ]; then tasks/e2e-behavior.sh; fi'
22+
env:
23+
matrix:
24+
- TEST_SUITE=simple
25+
- TEST_SUITE=installs
26+
- TEST_SUITE=kitchensink
27+
# - TEST_SUITE=kitchensink-eject
28+
# - TEST_SUITE=behavior
29+
matrix:
30+
include:
31+
- os: osx
32+
node_js: 10
33+
env: TEST_SUITE=behavior

README.md

Lines changed: 7 additions & 208 deletions
Original file line numberDiff line numberDiff line change
@@ -1,213 +1,12 @@
1-
# Create React App [![Build Status](https://dev.azure.com/facebook/create-react-app/_apis/build/status/facebook.create-react-app?branchName=master)](https://dev.azure.com/facebook/create-react-app/_build/latest?definitionId=1&branchName=master) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)](https://github.com/facebook/create-react-app/blob/master/CONTRIBUTING.md)
1+
# `backpack-react-scripts` [![Build Status](https://travis-ci.org/Skyscanner/backpack-react-scripts.svg?branch=fork)](https://travis-ci.org/Skyscanner/backpack-react-scripts)
22

3-
Create React apps with no build configuration.
3+
**⚠️ This is a fork of Facebook's [Create React App](https://github.com/facebook/create-react-app).**
44

5-
- [Creating an App](#creating-an-app) – How to create a new app.
6-
- [User Guide](https://facebook.github.io/create-react-app/) – How to develop apps bootstrapped with Create React App.
5+
Specifically, it is a fork of the [`react-scripts`](https://github.com/facebook/create-react-app/tree/master/packages/react-scripts) package. It adds Backpack component support and server-side rendering functionality (amongst other things).
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/facebook/create-react-app/issues/new).<br>
10-
If you have questions or need help, please ask in our [Spectrum](https://spectrum.chat/create-react-app) community.
7+
In order to benefit from the ongoing open source development of create-react-app, this fork is kept up-to-date with the upstream repo. To aid this, we have preserved the existing repo structure, including all of the source code for the other packages that live alongside [`react-scripts`](https://github.com/facebook/create-react-app/tree/master/packages/react-scripts). **We do not modify any source code outside of [`react-scripts`](https://github.com/facebook/create-react-app/tree/master/packages/react-scripts).**
118

12-
## Quick Overview
9+
Files of interest:
1310

14-
```sh
15-
npx create-react-app my-app
16-
cd my-app
17-
npm start
18-
```
19-
20-
If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, we recommend you uninstall the package using `npm uninstall -g create-react-app` to ensure that npx always uses the latest version.
21-
22-
_([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f))_
23-
24-
Then open [http://localhost:3000/](http://localhost:3000/) to see your app.<br>
25-
When you’re ready to deploy to production, create a minified bundle with `npm run build`.
26-
27-
<p align='center'>
28-
<img src='https://cdn.jsdelivr.net/gh/facebook/create-react-app@27b42ac7efa018f2541153ab30d63180f5fa39e0/screencast.svg' width='600' alt='npm start'>
29-
</p>
30-
31-
### Get Started Immediately
32-
33-
You **don’t** need to install or configure tools like webpack or Babel.<br>
34-
They are preconfigured and hidden so that you can focus on the code.
35-
36-
Create a project, and you’re good to go.
37-
38-
## Creating an App
39-
40-
**You’ll need to have Node 8.16.0 or Node 10.16.0 or later version on your local development machine** (but it’s not required on the server). You can use [nvm](https://github.com/creationix/nvm#installation) (macOS/Linux) or [nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows) to switch Node versions between different projects.
41-
42-
To create a new app, you may choose one of the following methods:
43-
44-
### npx
45-
46-
```sh
47-
npx create-react-app my-app
48-
```
49-
50-
_([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) is a package runner tool that comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f))_
51-
52-
### npm
53-
54-
```sh
55-
npm init react-app my-app
56-
```
57-
58-
_`npm init <initializer>` is available in npm 6+_
59-
60-
### Yarn
61-
62-
```sh
63-
yarn create react-app my-app
64-
```
65-
66-
_[`yarn create <starter-kit-package>`](https://yarnpkg.com/lang/en/docs/cli/create/) is available in Yarn 0.25+_
67-
68-
It will create a directory called `my-app` inside the current folder.<br>
69-
Inside that directory, it will generate the initial project structure and install the transitive dependencies:
70-
71-
```
72-
my-app
73-
├── README.md
74-
├── node_modules
75-
├── package.json
76-
├── .gitignore
77-
├── public
78-
│ ├── favicon.ico
79-
│ ├── index.html
80-
│ └── manifest.json
81-
└── src
82-
├── App.css
83-
├── App.js
84-
├── App.test.js
85-
├── index.css
86-
├── index.js
87-
├── logo.svg
88-
└── serviceWorker.js
89-
```
90-
91-
No configuration or complicated folder structures, only the files you need to build your app.<br>
92-
Once the installation is done, you can open your project folder:
93-
94-
```sh
95-
cd my-app
96-
```
97-
98-
Inside the newly created project, you can run some built-in commands:
99-
100-
### `npm start` or `yarn start`
101-
102-
Runs the app in development mode.<br>
103-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
104-
105-
The page will automatically reload if you make changes to the code.<br>
106-
You will see the build errors and lint warnings in the console.
107-
108-
<p align='center'>
109-
<img src='https://cdn.jsdelivr.net/gh/marionebl/create-react-app@9f6282671c54f0874afd37a72f6689727b562498/screencast-error.svg' width='600' alt='Build errors'>
110-
</p>
111-
112-
### `npm test` or `yarn test`
113-
114-
Runs the test watcher in an interactive mode.<br>
115-
By default, runs tests related to files changed since the last commit.
116-
117-
[Read more about testing.](https://facebook.github.io/create-react-app/docs/running-tests)
118-
119-
### `npm run build` or `yarn build`
120-
121-
Builds the app for production to the `build` folder.<br>
122-
It correctly bundles React in production mode and optimizes the build for the best performance.
123-
124-
The build is minified and the filenames include the hashes.<br>
125-
126-
Your app is ready to be deployed.
127-
128-
## User Guide
129-
130-
You can find detailed instructions on using Create React App and many tips in [its documentation](https://facebook.github.io/create-react-app/).
131-
132-
## How to Update to New Versions?
133-
134-
Please refer to the [User Guide](https://facebook.github.io/create-react-app/docs/updating-to-new-releases) for this and other information.
135-
136-
## Philosophy
137-
138-
- **One Dependency:** There is only one build dependency. It uses webpack, Babel, ESLint, and other amazing projects, but provides a cohesive curated experience on top of them.
139-
140-
- **No Configuration Required:** You don't need to configure anything. A reasonably good configuration of both development and production builds is handled for you so you can focus on writing code.
141-
142-
- **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.
143-
144-
## What’s Included?
145-
146-
Your environment will have everything you need to build a modern single-page React app:
147-
148-
- React, JSX, ES6, TypeScript and Flow syntax support.
149-
- Language extras beyond ES6 like the object spread operator.
150-
- Autoprefixed CSS, so you don’t need `-webkit-` or other prefixes.
151-
- A fast interactive unit test runner with built-in support for coverage reporting.
152-
- A live development server that warns about common mistakes.
153-
- A build script to bundle JS, CSS, and images for production, with hashes and sourcemaps.
154-
- 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://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) criteria. (_Note: Using the service worker is opt-in as of `react-scripts@2.0.0` and higher_)
155-
- Hassle-free updates for the above tools with a single dependency.
156-
157-
Check out [this guide](https://github.com/nitishdayal/cra_closer_look) for an overview of how these tools fit together.
158-
159-
The tradeoff is that **these tools are preconfigured to work in a specific way**. If your project needs more customization, you can ["eject"](https://facebook.github.io/create-react-app/docs/available-scripts#npm-run-eject) and customize it, but then you will need to maintain this configuration.
160-
161-
## Popular Alternatives
162-
163-
Create React App is a great fit for:
164-
165-
- **Learning React** in a comfortable and feature-rich development environment.
166-
- **Starting new single-page React applications.**
167-
- **Creating examples** with React for your libraries and components.
168-
169-
Here are a few common cases where you might want to try something else:
170-
171-
- If you want to **try React** without hundreds of transitive build tool dependencies, consider [using a single HTML file or an online sandbox instead](https://reactjs.org/docs/try-react.html).
172-
173-
- If you need to **integrate React code with a server-side template framework** like Rails, Django or Symfony, or if you’re **not building a single-page app**, consider using [nwb](https://github.com/insin/nwb), or [Neutrino](https://neutrino.js.org/) which are more flexible. For Rails specifically, you can use [Rails Webpacker](https://github.com/rails/webpacker). For Symfony, try [Symfony's webpack Encore](https://symfony.com/doc/current/frontend/encore/reactjs.html).
174-
175-
- If you need to **publish a React component**, [nwb](https://github.com/insin/nwb) can [also do this](https://github.com/insin/nwb#react-components-and-libraries), as well as [Neutrino's react-components preset](https://neutrino.js.org/packages/react-components/).
176-
177-
- If you want to do **server rendering** with React and Node.js, check out [Next.js](https://github.com/zeit/next.js/) or [Razzle](https://github.com/jaredpalmer/razzle). Create React App is agnostic of the backend, and only produces static HTML/JS/CSS bundles.
178-
179-
- If your website is **mostly static** (for example, a portfolio or a blog), consider using [Gatsby](https://www.gatsbyjs.org/) instead. Unlike Create React App, it pre-renders the website into HTML at the build time.
180-
181-
- Finally, if you need **more customization**, check out [Neutrino](https://neutrino.js.org/) and its [React preset](https://neutrino.js.org/packages/react/).
182-
183-
All of the above tools can work with little to no configuration.
184-
185-
If you prefer configuring the build yourself, [follow this guide](https://reactjs.org/docs/add-react-to-an-existing-app.html).
186-
187-
## React Native
188-
189-
Looking for something similar, but for React Native?<br>
190-
Check out [Expo CLI](https://github.com/expo/expo-cli).
191-
192-
## Contributing
193-
194-
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.
195-
196-
## Credits
197-
198-
This project exists thanks to all the people who [contribute](CONTRIBUTING.md).<br>
199-
<a href="https://github.com/facebook/create-react-app/graphs/contributors"><img src="https://opencollective.com/create-react-app/contributors.svg?width=890&button=false" /></a>
200-
201-
Thanks to [Netlify](https://www.netlify.com/) for hosting our documentation.
202-
203-
## Acknowledgements
204-
205-
We are grateful to the authors of existing related projects for their ideas and collaboration:
206-
207-
- [@eanplatter](https://github.com/eanplatter)
208-
- [@insin](https://github.com/insin)
209-
- [@mxstbr](https://github.com/mxstbr)
210-
211-
## License
212-
213-
Create React App is open source software [licensed as MIT](https://github.com/facebook/create-react-app/blob/master/LICENSE).
11+
- [`react-scripts` README](packages/react-scripts/README.md)
12+
- [`react-scripts` CHANGELOG](packages/react-scripts/CHANGELOG.md)

docusaurus/website/yarn.lock

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7231,15 +7231,15 @@ react-dev-utils@^9.1.0:
72317231
strip-ansi "5.2.0"
72327232
text-table "0.2.0"
72337233

7234-
react-dom@^16.11.0:
7235-
version "16.12.0"
7236-
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.12.0.tgz#0da4b714b8d13c2038c9396b54a92baea633fe11"
7237-
integrity sha512-LMxFfAGrcS3kETtQaCkTKjMiifahaMySFDn71fZUNpPHZQEzmk/GiAeIT8JSOrHB23fnuCOMruL2a8NYlw+8Gw==
7234+
react-dom@^16.12.0:
7235+
version "16.13.1"
7236+
resolved "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz#c1bd37331a0486c078ee54c4740720993b2e0e7f"
7237+
integrity sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==
72387238
dependencies:
72397239
loose-envify "^1.1.0"
72407240
object-assign "^4.1.1"
72417241
prop-types "^15.6.2"
7242-
scheduler "^0.18.0"
7242+
scheduler "^0.19.1"
72437243

72447244
react-error-overlay@^6.0.3:
72457245
version "6.0.4"
@@ -7328,10 +7328,10 @@ react-toggle@^4.1.1:
73287328
dependencies:
73297329
classnames "^2.2.5"
73307330

7331-
react@^16.11.0:
7332-
version "16.12.0"
7333-
resolved "https://registry.yarnpkg.com/react/-/react-16.12.0.tgz#0c0a9c6a142429e3614834d5a778e18aa78a0b83"
7334-
integrity sha512-fglqy3k5E+81pA8s+7K0/T3DBCF0ZDOher1elBFzF7O6arXJgzyu/FW+COxFvAWXJoJN9KIZbT2LXlukwphYTA==
7331+
react@^16.12.0:
7332+
version "16.13.1"
7333+
resolved "https://registry.npmjs.org/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e"
7334+
integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==
73357335
dependencies:
73367336
loose-envify "^1.1.0"
73377337
object-assign "^4.1.1"
@@ -7747,10 +7747,10 @@ sax@^1.2.4, sax@~1.2.4:
77477747
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
77487748
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
77497749

7750-
scheduler@^0.18.0:
7751-
version "0.18.0"
7752-
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.18.0.tgz#5901ad6659bc1d8f3fdaf36eb7a67b0d6746b1c4"
7753-
integrity sha512-agTSHR1Nbfi6ulI0kYNK0203joW2Y5W4po4l+v03tOoiJKpTBbxpNhWDvqc/4IcOw+KLmSiQLTasZ4cab2/UWQ==
7750+
scheduler@^0.19.1:
7751+
version "0.19.1"
7752+
resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196"
7753+
integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==
77547754
dependencies:
77557755
loose-envify "^1.1.0"
77567756
object-assign "^4.1.1"

packages/babel-plugin-named-asset-import/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "babel-plugin-named-asset-import",
33
"version": "0.3.6",
4+
"private": true,
45
"description": "Babel plugin for named asset imports in Create React App",
56
"repository": {
67
"type": "git",

packages/babel-preset-react-app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "babel-preset-react-app",
33
"version": "9.1.2",
4+
"private": true,
45
"description": "Babel preset used by Create React App",
56
"repository": {
67
"type": "git",

packages/confusing-browser-globals/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "confusing-browser-globals",
33
"version": "1.0.9",
4+
"private": true,
45
"description": "A list of browser globals that are often used by mistake instead of local variables",
56
"license": "MIT",
67
"main": "index.js",

packages/cra-template-typescript/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "cra-template-typescript",
33
"version": "1.0.3",
4+
"private": true,
45
"keywords": [
56
"react",
67
"create-react-app",

packages/cra-template/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "cra-template",
33
"version": "1.0.3",
4+
"private": true,
45
"keywords": [
56
"react",
67
"create-react-app",

packages/create-react-app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "create-react-app",
33
"version": "3.4.1",
4+
"private": true,
45
"keywords": [
56
"react"
67
],

packages/eslint-config-react-app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "eslint-config-react-app",
33
"version": "5.2.1",
4+
"private": true,
45
"description": "ESLint configuration used by Create React App",
56
"repository": {
67
"type": "git",

0 commit comments

Comments
 (0)