Skip to content

Commit

Permalink
Add web script, update README for web
Browse files Browse the repository at this point in the history
  • Loading branch information
lynn committed Sep 5, 2023
1 parent 58fa40f commit ee83bf5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: npm run prettier:check

- name: Build project
run: npm run vite:build
run: npm run web:build
- name: Upload production-ready build files
uses: actions/upload-artifact@v3
with:
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ For proper PNG rendering, install

## Usage

To run as a web app (at <http://localhost:5173/>):

```sh
npm install
npm run web -- --port 5173
```

To run as a CLI app:

```sh
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"codegen": "npx nearleyc src/toaq.ne -o src/grammar.ts",
"ts:build": "npx tsc",
"ts:check": "npx tsc --noEmit",
"vite:build": "npx vite build"
"web": "npx vite",
"web:build": "npx vite build"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit ee83bf5

Please sign in to comment.