kirbyup 2.0.0-beta.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,7 +8,7 @@ The fastest and leanest way to bundle your Kirby Panel plugins. No configuration
8
8
 
9
9
  - 🍂 Lightweight, robust and tested
10
10
  - âšĄī¸ Fast compilation with Vite/esbuild
11
- - 🔄 Hot Module Replacement and watch mode
11
+ - 🔄 Hot Module Replacement and watch mode (requires Kirby v3.7.4+)
12
12
  - \*ī¸âƒŖ `kirbyup.import` to [auto-import blocks & fields](#auto-import-blocks-and-fields)
13
13
  - 🎒 [PostCSS support](#postcss)
14
14
  - 🧭 [Path resolve aliases](#path-resolve-aliases)
@@ -17,9 +17,7 @@ The fastest and leanest way to bundle your Kirby Panel plugins. No configuration
17
17
 
18
18
  ## Requirements
19
19
 
20
- - Node 14+ (Node 16 recommended)
21
-
22
- > â„šī¸ When using kirbyup with `npx`, **npm 7+** is required. Previous versions don't pass cli arguments to the package invoked. npm 7 is bundled from Node 16 onwards.
20
+ - Node 16 (active LTS) or newer
23
21
 
24
22
  ## Get Started Right Away
25
23
 
@@ -36,7 +34,8 @@ If you want to use kirbyup right away, there is no need to install it. Simply ca
36
34
  ```json
37
35
  {
38
36
  "scripts": {
39
- "dev": "npx -y kirbyup serve src/index.js",
37
+ "dev": "npx -y kirbyup src/index.js --watch",
38
+ "serve": "npx -y kirbyup serve src/index.js",
40
39
  "build": "npx -y kirbyup src/index.js"
41
40
  }
42
41
  }
@@ -55,7 +54,8 @@ Example package configuration:
55
54
  ```json
56
55
  {
57
56
  "scripts": {
58
- "dev": "kirbyup serve src/index.js",
57
+ "dev": "kirbyup src/index.js --watch",
58
+ "serve": "kirbyup serve src/index.js",
59
59
  "build": "kirbyup src/index.js"
60
60
  },
61
61
  "devDependencies": {
@@ -72,12 +72,20 @@ Global installation is supported as well, but not recommended.
72
72
 
73
73
  Start a development server for the Panel plugin:
74
74
 
75
+ > â„šī¸ This feature requires Kirby v3.7.4+.
76
+
75
77
  ```bash
76
78
  kirbyup serve src/index.js
77
79
  ```
78
80
 
79
81
  This creates `./index.dev.mjs`, telling Kirby to load the development version of the plugin from the dev server started by `kirbyup serve`, enhanced by features like hot module replacement and auto-reload.
80
82
 
83
+ If you prefer the watch mode to build a development bundle of the final Panel plugin or develop in an older version of Kirby (prior to 3.7.4), run:
84
+
85
+ ```bash
86
+ kirbyup src/index.js --watch
87
+ ```
88
+
81
89
  ### Production
82
90
 
83
91
  ```bash
@@ -158,14 +166,7 @@ During production, these env variables are **statically replaced**. It is theref
158
166
 
159
167
  #### `.env` Files
160
168
 
161
- kirbyup (thanks to Vite) uses [dotenv](https://github.com/motdotla/dotenv) to load additional environment variables from the following files in your plugin's root directory:
162
-
163
- ```
164
- .env # loaded in all cases
165
- .env.local # loaded in all cases, ignored by git
166
- .env.[mode] # only loaded in specified mode
167
- .env.[mode].local # only loaded in specified mode, ignored by git
168
- ```
169
+ kirbyup (thanks to Vite) uses [dotenv](https://github.com/motdotla/dotenv) to load additional environment variables from the `.env` and `.env.local` files in your plugin's root directory.
169
170
 
170
171
  Loaded env variables are also exposed to your source code via `import.meta.env`.
171
172
 
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { cac } from 'cac';
2
- import { n as name, b as build, s as serve, v as version, h as handleError } from './shared/kirbyup.275c66c6.mjs';
2
+ import { n as name, b as build, s as serve, v as version, h as handleError } from './shared/kirbyup.1b72ea0c.mjs';
3
3
  import 'node:fs';
4
4
  import 'node:fs/promises';
5
5
  import 'pathe';
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import 'node:fs';
2
2
  import 'node:fs/promises';
3
3
  import 'pathe';
4
4
  import 'vite';
5
- export { b as build, s as serve } from './shared/kirbyup.275c66c6.mjs';
5
+ export { b as build, s as serve } from './shared/kirbyup.1b72ea0c.mjs';
6
6
  import 'postcss-load-config';
7
7
  import 'postcss-logical';
8
8
  import 'postcss-dir-pseudo-class';
@@ -3270,7 +3270,7 @@ function vuePlugin(rawOptions = {}) {
3270
3270
  }
3271
3271
 
3272
3272
  const name = "kirbyup";
3273
- const version = "2.0.0-beta.0";
3273
+ const version = "2.0.0";
3274
3274
 
3275
3275
  class PrettyError extends Error {
3276
3276
  constructor(message) {
@@ -3394,7 +3394,7 @@ try {
3394
3394
  await import("${entryUrl}");
3395
3395
  } catch (err) {
3396
3396
  console.error(
3397
- "[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."
3397
+ "[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."
3398
3398
  );
3399
3399
  throw err;
3400
3400
  }`.trim();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kirbyup",
3
- "version": "2.0.0-beta.0",
4
- "packageManager": "pnpm@7.9.0",
3
+ "version": "2.0.0",
4
+ "packageManager": "pnpm@7.9.4",
5
5
  "description": "Zero-config bundler for Kirby Panel plugins",
6
6
  "author": {
7
7
  "name": "Johann Schopplich",
@@ -57,7 +57,7 @@
57
57
  "dist"
58
58
  ],
59
59
  "engines": {
60
- "node": ">=14"
60
+ "node": ">=16"
61
61
  },
62
62
  "scripts": {
63
63
  "build": "unbuild",
@@ -70,7 +70,7 @@
70
70
  "prepare": "simple-git-hooks"
71
71
  },
72
72
  "dependencies": {
73
- "@vue/compiler-sfc": "^2.7.8",
73
+ "@vue/compiler-sfc": "^2.7.10",
74
74
  "cac": "^6.7.12",
75
75
  "chokidar": "^3.5.3",
76
76
  "consola": "^2.15.3",
@@ -83,16 +83,16 @@
83
83
  "postcss-dir-pseudo-class": "^6.0.5",
84
84
  "postcss-load-config": "^4.0.1",
85
85
  "postcss-logical": "^5.0.4",
86
- "sass": "^1.54.4",
86
+ "sass": "^1.54.5",
87
87
  "unconfig": "^0.3.5",
88
- "vite": "^3.0.8",
88
+ "vite": "^3.0.9",
89
89
  "vite-plugin-full-reload": "^1.0.4",
90
- "vue": "^2.7.8"
90
+ "vue": "^2.7.10"
91
91
  },
92
92
  "devDependencies": {
93
93
  "@antfu/eslint-config": "^0.26.1",
94
94
  "@types/fs-extra": "^9.0.13",
95
- "@types/node": "^18.7.6",
95
+ "@types/node": "^18.7.11",
96
96
  "@types/prompts": "^2.4.0",
97
97
  "@vitejs/plugin-vue2": "^1.1.2",
98
98
  "bumpp": "^8.2.1",
@@ -101,7 +101,7 @@
101
101
  "fs-extra": "^10.1.0",
102
102
  "simple-git-hooks": "^2.8.0",
103
103
  "typescript": "^4.7.4",
104
- "unbuild": "^0.8.8",
104
+ "unbuild": "^0.8.9",
105
105
  "vitest": "^0.22.1"
106
106
  },
107
107
  "pnpm": {