Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ce77eab
Backpackify
olliecurtis Jun 10, 2020
cb6ab31
[LEOP-21]: Add `cache-loader` to speed up local development (#92)
jaysonwu991 May 14, 2021
b2a21aa
[LEOP-23]: Add thread-loader to speed up webpack workflow (#93)
jaysonwu991 May 14, 2021
73cfa32
Publish 9.1.0
olliecurtis May 14, 2021
914c6be
Optimize thread loader to fix build storybook failed (#94)
jaysonwu991 May 24, 2021
07fd1c8
[NO JIRA]: Adding new paths for scoped Backpack packages (#97)
olliecurtis Jun 14, 2021
042cb43
[NO JIRA]: Add ignoreCssWarnings option
olliecurtis Jun 29, 2021
efda249
[LEOP-55]: Apply cache-loader on CI (#99)
jaysonwu991 Jul 19, 2021
2ce55de
[LEOP-166]: Move cache-loader above resolve-url-loader to get the bes…
jaysonwu991 Aug 31, 2021
71e2574
[NO JIRA] Ident creation using Project Name (#103)
djkf Sep 23, 2021
d1f438f
Uninstall typescript linting dependencies from react-scripts (#104)
dominicfraser Oct 21, 2021
5848cfa
Correcting strange @ symbol in docs
olliecurtis Jan 10, 2022
0fce006
[NO JIRA]: Set node version to v14.x in workflow (#117)
SophiaChen2021 Jan 27, 2022
47fd717
[LEOP-280]Upgrade sass-loader to v10.x (#116)
SophiaChen2021 Jan 28, 2022
c07c5d7
Publish version 9.5.1
olliecurtis Feb 9, 2022
991f584
[skip ci] Add missing changelog entries
olliecurtis Feb 16, 2022
6c1b69d
[LEOP-247]Upgrade node to v16 (#120)
SophiaChen2021 Feb 18, 2022
bfdd54e
Merge change log (#121)
SophiaChen2021 Feb 18, 2022
35d776d
[LEOP-316]Extract babelIncludePrefixes feature (#122)
taofang2021 Feb 25, 2022
49ad303
Extract crossOriginLoading and sriEnabled feature (#123)
taofang2021 Feb 25, 2022
b910bf5
Extract ignoreCssWarnings feature (#124)
taofang2021 Feb 25, 2022
a87c78d
[LEOP-316]Extract cssModules feature (#126)
taofang2021 Feb 25, 2022
d7ffb76
extract amdExludes (#130)
salleyliu Mar 1, 2022
f5b619e
[LEOP-317]Extract splitChunks (#127)
salleyliu Mar 1, 2022
e4a30a7
set ssrExternals (#129)
salleyliu Mar 1, 2022
1f817c1
[LEOP-317]Extract sassFunctions (#125)
salleyliu Mar 1, 2022
b9dfaf9
[LEOP-317]Prefect Backpack-addons README.md (#131)
salleyliu Mar 1, 2022
6aa03fa
[LEOP-317]Extract runtimeChunk (#128)
salleyliu Mar 1, 2022
079b979
fix not find encodebase64 function error
salleyliu Mar 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/build-brs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build BRS

on:
push:
branches: [fork]
pull_request:
branches: [fork]

defaults:
run:
shell: bash -l {0}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14.x

- name: Run simple
run: |
tasks/e2e-simple.sh

- name: Run Installs
run: |
tasks/e2e-installs.sh

## For now we don't need to worry about Kitchensink as this is also failing upstream and the functions is executes are not relevant

# - name: Run Kitchensink
# shell: bash -l {0}
# run: |
# nvm use lts/erbium
# tasks/e2e-kitchensink.sh

# - name: Run Kitchensink Eject
# shell: bash -l {0}
# run: |
# nvm use lts/erbium
# tasks/e2e-kitchensink-eject.sh

# - name: Run Behaviour
# shell: bash -l {0}
# run: |
# nvm use lts/erbium
# tasks/e2e-behavior.sh
13 changes: 12 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
name: Build

on: [push]
on:
push:
branches: [fork]
pull_request:
branches: [fork]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14.x

- name: Install
run: yarn --no-progress --non-interactive --no-lockfile

- name: Build
run: yarn build
13 changes: 12 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
name: Lint

on: [push]
on:
push:
branches: [fork]
pull_request:
branches: [fork]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14.x

- name: Install
run: yarn --no-progress --non-interactive --no-lockfile

- name: Alex
run: yarn alex
222 changes: 7 additions & 215 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,220 +1,12 @@
# 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)
# `backpack-react-scripts` [![Build Status](https://travis-ci.org/Skyscanner/backpack-react-scripts.svg?branch=fork)](https://travis-ci.org/Skyscanner/backpack-react-scripts)

<img alt="Logo" align="right" src="https://create-react-app.dev/img/logo.svg" width="20%" />
**⚠️ This is a fork of Facebook's [Create React App](https://github.com/facebook/create-react-app).**

Create React apps with no build configuration.
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).

- [Creating an App](#creating-an-app) – How to create a new app.
- [User Guide](https://facebook.github.io/create-react-app/) – How to develop apps bootstrapped with Create React App.
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).**

Create React App works on macOS, Windows, and Linux.<br>
If something doesn’t work, please [file an issue](https://github.com/facebook/create-react-app/issues/new).<br>
If you have questions or need help, please ask in [GitHub Discussions](https://github.com/facebook/create-react-app/discussions).
Files of interest:

## Quick Overview

```sh
npx create-react-app my-app
cd my-app
npm start
```

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` or `yarn global remove create-react-app` to ensure that npx always uses the latest version.

_([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))_

Then open [http://localhost:3000/](http://localhost:3000/) to see your app.<br>
When you’re ready to deploy to production, create a minified bundle with `npm run build`.

<p align='center'>
<img src='https://cdn.jsdelivr.net/gh/facebook/create-react-app@27b42ac7efa018f2541153ab30d63180f5fa39e0/screencast.svg' width='600' alt='npm start'>
</p>

### Get Started Immediately

You **don’t** need to install or configure tools like webpack or Babel.<br>
They are preconfigured and hidden so that you can focus on the code.

Create a project, and you’re good to go.

## Creating an App

**You’ll need to have Node 10.16.0 or later version on your local development machine** (but it’s not required on the server). We recommend using the latest LTS version. 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.

To create a new app, you may choose one of the following methods:

### npx

```sh
npx create-react-app my-app
```

_([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))_

### npm

```sh
npm init react-app my-app
```

_`npm init <initializer>` is available in npm 6+_

### Yarn

```sh
yarn create react-app my-app
```

_[`yarn create <starter-kit-package>`](https://yarnpkg.com/lang/en/docs/cli/create/) is available in Yarn 0.25+_

It will create a directory called `my-app` inside the current folder.<br>
Inside that directory, it will generate the initial project structure and install the transitive dependencies:

```
my-app
├── README.md
├── node_modules
├── package.json
├── .gitignore
├── public
│ ├── favicon.ico
│ ├── index.html
│ └── manifest.json
└── src
├── App.css
├── App.js
├── App.test.js
├── index.css
├── index.js
├── logo.svg
└── serviceWorker.js
└── setupTests.js
```

No configuration or complicated folder structures, only the files you need to build your app.<br>
Once the installation is done, you can open your project folder:

```sh
cd my-app
```

Inside the newly created project, you can run some built-in commands:

### `npm start` or `yarn start`

Runs the app in development mode.<br>
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will automatically reload if you make changes to the code.<br>
You will see the build errors and lint warnings in the console.

<p align='center'>
<img src='https://cdn.jsdelivr.net/gh/marionebl/create-react-app@9f6282671c54f0874afd37a72f6689727b562498/screencast-error.svg' width='600' alt='Build errors'>
</p>

### `npm test` or `yarn test`

Runs the test watcher in an interactive mode.<br>
By default, runs tests related to files changed since the last commit.

[Read more about testing.](https://facebook.github.io/create-react-app/docs/running-tests)

### `npm run build` or `yarn build`

Builds the app for production to the `build` folder.<br>
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.<br>

Your app is ready to be deployed.

## User Guide

You can find detailed instructions on using Create React App and many tips in [its documentation](https://facebook.github.io/create-react-app/).

## How to Update to New Versions?

Please refer to the [User Guide](https://facebook.github.io/create-react-app/docs/updating-to-new-releases) for this and other information.

## Philosophy

- **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.

- **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.

- **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.

## What’s Included?

Your environment will have everything you need to build a modern single-page React app:

- React, JSX, ES6, TypeScript and Flow syntax support.
- Language extras beyond ES6 like the object spread operator.
- Autoprefixed CSS, so you don’t need `-webkit-` or other prefixes.
- A fast interactive unit test runner with built-in support for coverage reporting.
- A live development server that warns about common mistakes.
- A build script to bundle JS, CSS, and images for production, with hashes and sourcemaps.
- 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_)
- Hassle-free updates for the above tools with a single dependency.

Check out [this guide](https://github.com/nitishdayal/cra_closer_look) for an overview of how these tools fit together.

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.

## Popular Alternatives

Create React App is a great fit for:

- **Learning React** in a comfortable and feature-rich development environment.
- **Starting new single-page React applications.**
- **Creating examples** with React for your libraries and components.

Here are a few common cases where you might want to try something else:

- 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).

- 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).

- 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/).

- If you want to do **server rendering** with React and Node.js, check out [Next.js](https://nextjs.org/) or [Razzle](https://github.com/jaredpalmer/razzle). Create React App is agnostic of the backend, and only produces static HTML/JS/CSS bundles.

- If your website is **mostly static** (for example, a portfolio or a blog), consider using [Gatsby](https://www.gatsbyjs.org/) or [Next.js](https://nextjs.org/). Unlike Create React App, Gatsby pre-renders the website into HTML at build time. Next.js supports both server rendering and pre-rendering.

- Finally, if you need **more customization**, check out [Neutrino](https://neutrino.js.org/) and its [React preset](https://neutrino.js.org/packages/react/).

All of the above tools can work with little to no configuration.

If you prefer configuring the build yourself, [follow this guide](https://reactjs.org/docs/add-react-to-an-existing-app.html).

## React Native

Looking for something similar, but for React Native?<br>
Check out [Expo CLI](https://github.com/expo/expo-cli).

## Contributing

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.

## Supporting Create React App

Create React App is a community maintained project and all contributors are volunteers. If you'd like to support the future development of Create React App then please consider donating to our [Open Collective](https://opencollective.com/create-react-app).

## Credits

This project exists thanks to all the people who [contribute](CONTRIBUTING.md).<br>
<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>

Thanks to [Netlify](https://www.netlify.com/) for hosting our documentation.

## Acknowledgements

We are grateful to the authors of existing related projects for their ideas and collaboration:

- [@eanplatter](https://github.com/eanplatter)
- [@insin](https://github.com/insin)
- [@mxstbr](https://github.com/mxstbr)

## License

Create React App is open source software [licensed as MIT](https://github.com/facebook/create-react-app/blob/master/LICENSE). The Create React App logo is licensed under a [Creative Commons Attribution 4.0 International license](https://creativecommons.org/licenses/by/4.0/).
- [`react-scripts` README](packages/react-scripts/README.md)
- [`react-scripts` CHANGELOG](packages/react-scripts/CHANGELOG.md)
1 change: 1 addition & 0 deletions packages/babel-plugin-named-asset-import/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "babel-plugin-named-asset-import",
"version": "0.3.7",
"private": true,
"description": "Babel plugin for named asset imports in Create React App",
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions packages/babel-preset-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "babel-preset-react-app",
"version": "10.0.0",
"private": true,
"description": "Babel preset used by Create React App",
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions packages/confusing-browser-globals/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "confusing-browser-globals",
"version": "1.0.10",
"private": true,
"description": "A list of browser globals that are often used by mistake instead of local variables",
"license": "MIT",
"main": "index.js",
Expand Down
1 change: 1 addition & 0 deletions packages/cra-template-typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "cra-template-typescript",
"version": "1.1.2",
"private": true,
"keywords": [
"react",
"create-react-app",
Expand Down
1 change: 1 addition & 0 deletions packages/cra-template/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "cra-template",
"version": "1.1.2",
"private": true,
"keywords": [
"react",
"create-react-app",
Expand Down
1 change: 1 addition & 0 deletions packages/create-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "create-react-app",
"version": "4.0.3",
"private": true,
"keywords": [
"react"
],
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "eslint-config-react-app",
"version": "6.0.0",
"private": true,
"description": "ESLint configuration used by Create React App",
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions packages/react-app-polyfill/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "react-app-polyfill",
"version": "2.0.0",
"private": true,
"description": "Polyfills for various browsers including commonly used language features",
"repository": {
"type": "git",
Expand Down
Loading