Skip to content

Commit

Permalink
Add preview script
Browse files Browse the repository at this point in the history
  • Loading branch information
arnoson committed May 11, 2022
1 parent cdb8caa commit 269ad42
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,37 @@
## Installation

Clone this repository and run:

```
composer install
```

```
npm install
```

## Development

Start vite's dev server and a simple php dev server by running:

```
npm run dev
```

Visit `localhost:8888` in the browser. Vite's dev server (`localhost:3000`) is only used for serving js, css and assets.

## Preview

Get a local production preview by running:

```
npm run preview
```

## Production

Build your optimized frontend assets to `public/dist`:

```
npm run build
```
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"vite": "vite",
"dev": "shx touch src/.lock && concurrently \"npm:server\" \"npm:vite\"",
"server": "php -S localhost:8888 -t public server.php",
"build": "shx rm -f src/.lock && vite build"
"build": "shx rm -f src/.lock && vite build",
"preview": "npm run build && npm run server"
},
"author": "arnoson",
"license": "MIT",
Expand Down

0 comments on commit 269ad42

Please sign in to comment.