Skip to content

Commit

Permalink
feat: nitro zero config (#107)
Browse files Browse the repository at this point in the history
* feat: nitro zero config (GH-92)

* feat: remove init nitro presets (GH-92)
  • Loading branch information
mdanilowicz authored Apr 6, 2023
1 parent 15c7915 commit 58bd8d6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/forty-peas-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vue-demo-store": minor
---

Remove Nitro preset initialisation
2 changes: 0 additions & 2 deletions templates/vue-demo-store/.env.production

This file was deleted.

16 changes: 8 additions & 8 deletions templates/vue-demo-store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,7 @@ In this chapter we will cover:

### Node server

To set a production build to run on node-server (SSR), change `NITRO_PRESET` entry in `.env.production` file:

```
NITRO_PRESET="node-server"
```

Then, the `build` script will invoke building the application for provided preset:
Use the `build` script to invoke building the application:

```bash
pnpm build
Expand All @@ -60,7 +54,7 @@ pnpm build
# or yarn build
```

The last step is to run `start` script in order to make the application running:
Then run `start` script in order to make the application running:

```bash
pnpm start
Expand Down Expand Up @@ -91,3 +85,9 @@ Run a container from the image:
# the application is exposed via 3000 port and mapped to 3000 port on host
docker run -p3000:3000 vue-demo-store
```

### Nitro presets

[HERE](https://nitro.unjs.io/deploy) can be found more about generating different outputs related to the platform

Our recommendation is to use `.env` file for changing platform presets
2 changes: 1 addition & 1 deletion templates/vue-demo-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"dev": "nuxi dev",
"build": "nuxi build --dotenv .env.production",
"build": "nuxi build",
"start": "nuxi start",
"lint": "eslint './**/*.{js,ts,vue}' --fix --max-warnings=0",
"generate": "nuxt generate",
Expand Down

1 comment on commit 58bd8d6

@vercel
Copy link

@vercel vercel bot commented on 58bd8d6 Apr 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.