Skip to content

Commit

Permalink
chore: add serve npm script for better migration
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Aug 22, 2022
1 parent a9a34b2 commit f1015e1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ If you want to use kirbyup right away, there is no need to install it. Simply ca
```json
{
"scripts": {
"dev": "npx -y kirbyup serve src/index.js",
"dev": "npx -y kirbyup src/index.js --watch",
"serve": "npx -y kirbyup serve src/index.js",
"build": "npx -y kirbyup src/index.js"
}
}
Expand All @@ -55,7 +56,8 @@ Example package configuration:
```json
{
"scripts": {
"dev": "kirbyup serve src/index.js",
"dev": "kirbyup src/index.js --watch",
"serve": "kirbyup serve src/index.js",
"build": "kirbyup src/index.js"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions examples/eslint-and-prettier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"private": true,
"scripts": {
"dev": "kirbyup serve src/index.js",
"serve": "kirbyup serve src/index.js",
"build": "kirbyup src/index.js",
"lint": "eslint \"src/**/*.{js,vue}\"",
"lint:fix": "npm run lint -- --fix",
Expand Down
1 change: 1 addition & 0 deletions examples/tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"private": true,
"scripts": {
"dev": "kirbyup serve src/index.js",
"serve": "kirbyup serve src/index.js",
"build": "kirbyup src/index.js"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/node/plugins/hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ try {
await import("${entryUrl}");
} catch (err) {
console.error(
"[kirbyup] Couldn't connect to the development server. Run \`${pm} run dev\` to start Vite or build the plugin with \`${pm} run build\` so Kirby uses the production version."
"[kirbyup] Couldn't connect to the development server. Run \`${pm} run serve\` to start Vite or build the plugin with \`${pm} run build\` so Kirby uses the production version."
);
throw err;
}`.trim()
Expand Down

0 comments on commit f1015e1

Please sign in to comment.