Skip to content

Commit 9acbb76

Browse files
committed
update doc
1 parent 574c70e commit 9acbb76

File tree

1 file changed

+39
-62
lines changed

1 file changed

+39
-62
lines changed

README.md

Lines changed: 39 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
# [Create DG-React](https://github.com/MS-DG/create-dg-react) [![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+
# [Create DG-React](https://github.com/MS-DG/create-dg-react)
22

3-
Create React apps with no build configuration.
3+
Create DG React apps with no build configuration.
4+
5+
> **You should login to the Microsoft Corp with your MSFT acount in your PC. When use the Default Template**
46
57
- [Creating an App](#creating-an-app) – How to create a new app.
68
- [User Guide](https://facebook.github.io/create-react-app/) – How to develop apps bootstrapped with Create React App.
79

8-
Create React App works on macOS, Windows, and Linux.
10+
Create DG React App works on macOS, Windows, and Linux.
911

1012
## Quick Overview
1113

1214
```sh
13-
npm create dg-react my-app
14-
cd my-app
15+
npm create dg-react dg-app
16+
cd dg-app
1517
npm start
1618
```
1719

@@ -36,32 +38,34 @@ To create a new app, you may choose one of the following methods:
3638
### npx
3739

3840
```sh
39-
npx create-react-app my-app
41+
npx create-dg-react dg-app
4042
```
4143

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

4446
### npm
4547

4648
```sh
47-
npm init dg-react my-app
49+
npm create dg-react dg-app
4850
```
4951

50-
_`npm init <initializer>` is available in npm 6+_
52+
_`npm create <initializer>` is available in npm 6+_
5153

5254
### Yarn
5355

5456
```sh
55-
yarn create dg-react my-app
57+
yarn create dg-react dg-app
5658
```
5759

5860
_`yarn create` is available in Yarn 0.25+_
5961

60-
It will create a directory called `my-app` inside the current folder.<br>
62+
### Default template
63+
64+
It will create a directory called `dg-app` inside the current folder.<br>
6165
Inside that directory, it will generate the initial project structure and install the transitive dependencies:
6266

6367
```
64-
my-app
68+
dg-app
6569
├── README.md
6670
├── node_modules
6771
├── package.json
@@ -74,7 +78,7 @@ my-app
7478
├── App.scss
7579
├── App.tsx
7680
├── App.test.tsx
77-
├── index.css
81+
├── index.scss
7882
├── index.tsx
7983
├── logo.svg
8084
└── serviceWorker.ts
@@ -84,31 +88,33 @@ No configuration or complicated folder structures, only the files you need to bu
8488
Once the installation is done, you can open your project folder:
8589

8690
```sh
87-
cd my-app
91+
cd dg-app
8892
```
8993

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

92-
### `npm start` or `yarn start`
96+
#### `npm start` or `yarn start`
97+
98+
Runs the app in development mode.
9399

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

97-
The page will automatically reload if you make changes to the code.<br>
102+
The page will automatically reload if you make changes to the code.
103+
98104
You will see the build errors and lint warnings in the console.
99105

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

104-
### `npm test` or `yarn test`
110+
#### `npm test` or `yarn test`
105111

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

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

111-
### `npm run build` or `yarn build`
117+
#### `npm run build` or `yarn build`
112118

113119
Builds the app for production to the `build` folder.<br>
114120
It correctly bundles React in production mode and optimizes the build for the best performance.
@@ -119,24 +125,31 @@ Your app is ready to be deployed.
119125

120126
## User Guide
121127

122-
You can find detailed instructions on using Create React App and many tips in [its documentation](https://facebook.github.io/create-react-app/).
128+
You can find detailed instructions on using Create DG App and many tips in [Create React App documentation (almost the same behaviors)](https://facebook.github.io/create-react-app/).
129+
130+
### How to Update to New Versions?
131+
132+
#### if you want to update current project (already exists)
123133

124-
## How to Update to New Versions?
134+
just update the dependency `@dragongate/react-scripts`.
125135

126-
Please refer to the [User Guide](https://facebook.github.io/create-react-app/docs/updating-to-new-releases) for this and other information.
136+
#### if you want to create a new project
137+
138+
just [create a app](#creating-an-app) without global install.
127139

128140
## Philosophy
129141

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

132-
- **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.
133-
134-
- **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.
144+
- **No Configuration:** 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.
135145

136146
## What’s Included?
137147

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

150+
- Integrated with Azure pipelines
151+
- Shared vscode (IDE) config and plugins
152+
- Force formatting
140153
- React, JSX, ES6, TypeScript and Flow syntax support.
141154
- Language extras beyond ES6 like the object spread operator.
142155
- Autoprefixed CSS, so you don’t need `-webkit-` or other prefixes.
@@ -146,44 +159,8 @@ Your environment will have everything you need to build a modern single-page Rea
146159
- 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_)
147160
- Hassle-free updates for the above tools with a single dependency.
148161

149-
Check out [this guide](https://github.com/nitishdayal/cra_closer_look) for an overview of how these tools fit together.
150-
151162
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.
152163

153-
## Popular Alternatives
154-
155-
Create React App is a great fit for:
156-
157-
- **Learning React** in a comfortable and feature-rich development environment.
158-
- **Starting new single-page React applications.**
159-
- **Creating examples** with React for your libraries and components.
160-
161-
Here are a few common cases where you might want to try something else:
162-
163-
- 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).
164-
165-
- 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).
166-
167-
- 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/).
168-
169-
- 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.
170-
171-
- 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.
172-
173-
- Finally, if you need **more customization**, check out [Neutrino](https://neutrino.js.org/) and its [React preset](https://neutrino.js.org/packages/react/).
174-
175-
All of the above tools can work with little to no configuration.
176-
177-
If you prefer configuring the build yourself, [follow this guide](https://reactjs.org/docs/add-react-to-an-existing-app.html).
178-
179-
## Acknowledgements
180-
181-
We are grateful to the authors of existing related projects for their ideas and collaboration:
182-
183-
- [@eanplatter](https://github.com/eanplatter)
184-
- [@insin](https://github.com/insin)
185-
- [@mxstbr](https://github.com/mxstbr)
186-
187164
## License
188165

189-
Create React App is open source software [licensed as MIT](https://github.com/facebook/create-react-app/blob/master/LICENSE).
166+
MIT

0 commit comments

Comments
 (0)