Skip to content

Commit

Permalink
chore: adjust script command
Browse files Browse the repository at this point in the history
  • Loading branch information
wellyshen committed Nov 9, 2020
1 parent a299c1f commit 57f0784
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 25 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ jobs:
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run type check
run: yarn type-check
- name: Run lint
run: yarn lint
- name: Run test
Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Please note we have a [code of conduct](https://github.com/wellyshen/react-cool-
4. Ensure the test suite passes by running `yarn test`.
5. Update the [README.md](https://github.com/wellyshen/react-cool-starter/blob/master/README.md) with details of changes.
6. Make sure your code lints by running `yarn lint`.
7. Make sure your code passes type check by running `yarn type-check`.

## Development Workflow

Expand Down
37 changes: 18 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,25 +108,24 @@ Now the app should be running at [http://localhost:8080](http://localhost:8080)

I use [cross-env](https://github.com/kentcdodds/cross-env) to set and use environment variables across platforms. All of the scripts are listed as following:

| `yarn <script>` | Description |
| ------------------ | -------------------------------------------------------------------------------- |
| `dev` | Run your app on the development server at `localhost:3000`. HMR will be enabled. |
| `start` | Run your app on the production server only at `localhost:8080`. |
| `build` | Delete the previous bundled files and bundle it to the `./public/assets`. |
| `analyze` | Visualize the contents of all your bundles. |
| `type-check` | Run type checking for `.tsx?` files. |
| `type-check:watch` | Run an interactive type checking watcher . |
| `lint` | Lint all `.tsx?`, `.jsx?` and `.scss` files. |
| `lint:code` | Lint all `.tsx?` and `.jsx?` files (With `--fix` to auto fix eslint errors). |
| `lint:style` | Lint all `.scss` files (With `--fix` to auto fix stylelint errors). |
| `lint:format` | Format all files except the file list of `.prettierignore`. |
| `test` | Run testing. |
| `test:watch` | Run an interactive test watcher. |
| `test:cov` | Run testing with code coverage reports. |
| `test:update` | Update jest snapshot. |
| `clean` | Delete the client/server bundled stuff and the coverage report. |
| `clean:build` | Delete the `./public/assets` folder to clean the client bundled files. |
| `clean:cov` | Delete the `./coverage` folder to clean the code coverage report. |
| `yarn <script>` | Description |
| --------------- | -------------------------------------------------------------------------------- |
| `dev` | Run your app on the development server at `localhost:3000`. HMR will be enabled. |
| `start` | Run your app on the production server only at `localhost:8080`. |
| `build` | Delete the previous bundled files and bundle it to the `./public/assets`. |
| `analyze` | Visualize the contents of all your bundles. |
| `lint` | Lint all `.tsx?`, `.jsx?` and `.scss` files. |
| `lint:code` | Lint all `.tsx?` and `.jsx?` files (With `--fix` to auto fix eslint errors). |
| `lint:type` | Run type checking for `.tsx?` files. |
| `lint:style` | Lint all `.scss` files (With `--fix` to auto fix stylelint errors). |
| `lint:format` | Format all files except the file list of `.prettierignore`. |
| `test` | Run testing. |
| `test:watch` | Run an interactive test watcher. |
| `test:cov` | Run testing with code coverage reports. |
| `test:update` | Update jest snapshot. |
| `clean` | Delete the client/server bundled stuff and the coverage report. |
| `clean:build` | Delete the `./public/assets` folder to clean the client bundled files. |
| `clean:cov` | Delete the `./coverage` folder to clean the code coverage report. |

## App Structure

Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-cool-starter",
"version": "3.14.1",
"version": "3.14.2",
"description": "A starter boilerplate for a universal web application with the best development experience and best practices.",
"license": "MIT",
"homepage": "https://github.com/wellyshen/react-cool-starter",
Expand Down Expand Up @@ -47,10 +47,9 @@
"start": "cross-env NODE_ENV=production ts-node --transpile-only --files .",
"build": "yarn clean:build && cross-env NODE_ENV=production webpack --progress --config ./tools/webpack/config.babel.js",
"analyze": "yarn clean:build && cross-env NODE_ENV=analyze webpack -p --progress --config ./tools/webpack/config.babel.js",
"type-check": "tsc",
"type-check:watch": "yarn type-check --watch",
"lint": "run-s lint:*",
"lint:code": "eslint --fix . --ext .js,.jsx,.ts,.tsx",
"lint:type": "tsc",
"lint:style": "stylelint --fix \"**/*.{css,ts,tsx}\"",
"lint:format": "prettier -w . -u --loglevel silent",
"test": "cross-env NODE_ENV=test jest",
Expand Down

0 comments on commit 57f0784

Please sign in to comment.