Skip to content

Commit 2ddead7

Browse files
committed
docs: update README
1 parent bd10df2 commit 2ddead7

File tree

1 file changed

+28
-10
lines changed

1 file changed

+28
-10
lines changed

README.md

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# Create React Sandbox
22

3-
[![Test base module on Ubuntu](https://github.com/bruce-x-wu/create-react-sandbox/actions/workflows/workflow_js.yml/badge.svg)](https://github.com/bruce-x-wu/create-react-sandbox/actions/workflows/workflow_js.yml)
4-
[![Test TypeScript support on Ubuntu](https://github.com/bruce-x-wu/create-react-sandbox/actions/workflows/workflow_ts.yml/badge.svg)](https://github.com/bruce-x-wu/create-react-sandbox/actions/workflows/workflow_ts.yml)
3+
[![Tests](https://github.com/b-x-wu/create-react-sandbox/actions/workflows/test-workflow.yml/badge.svg)](https://github.com/b-x-wu/create-react-sandbox/actions/workflows/test-workflow.yml)
54

6-
Create a lightweight React sandbox on your local system that runs like [Create React App](https://github.com/facebook/create-react-app) but without all the dependencies.
5+
![NPM Version](https://img.shields.io/npm/v/create-react-sandbox)
76

8-
So far, Create React Sandbox has been tested on Windows and on an Ubuntu Github workflow. If something does not work please [file an issue](https://github.com/bruce-x-wu/create-react-sandbox/issues).
7+
Create a lightweight React sandbox on your local system that runs like [Create React App](https://github.com/facebook/create-react-app) but without all the dependencies.
98

109
## Getting Started
1110

@@ -18,22 +17,41 @@ npm install -g create-react-sandbox
1817
To use, run
1918

2019
```bash
21-
npx create-react-sandbox react-sandbox
22-
cd react-sandbox
20+
npx create-react-sandbox
21+
cd app
22+
npm start
23+
```
24+
25+
The sandbox app will run on [http://localhost:3001](http://localhost:3001) (or if you have a `PORT` environment variable set, it will run on that instead).
26+
27+
To build your code, run `npm run build`. The build output will be in the `dist` directory.
28+
29+
## Configuration
30+
31+
To set the name of your sandbox, use the `--name` option.
32+
33+
```bash
34+
npx create-react-sandbox --name project-name
35+
cd project-name
2336
npm start
2437
```
2538

2639
If you would like to use TypeScript in your project, run with the `-t` flag.
2740

2841
```bash
29-
npx create-react-sandbox react-sandbox-with-typescript -t
30-
cd react-sandbox-with-typescript
42+
npx create-react-sandbox -t
43+
cd app
3144
npm start
3245
```
3346

34-
In either case, the sandbox app will run on [http://localhost:3001](http://localhost:3001) (or if you have a `PORT` environment variable set, it will run on that instead).
47+
To add [Eslint](https://eslint.org) support, run with the `-l` flag.
3548

36-
To build your code, run `npm run build`. The build output will be in the `dist` directory.
49+
```bash
50+
npx create-react-sandbox -l # or `npx create-react-sandbox -t -l` for ts and eslint support
51+
cd app
52+
npx eslint
53+
npm start
54+
```
3755

3856
## Use Cases
3957

0 commit comments

Comments
 (0)