kirbyup 0.9.2 → 0.9.3

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/dist/cli.js CHANGED
@@ -56,7 +56,7 @@ var name, version;
56
56
  var init_package = __esm({
57
57
  "package.json"() {
58
58
  name = "kirbyup";
59
- version = "0.9.2";
59
+ version = "0.9.3";
60
60
  }
61
61
  });
62
62
 
@@ -153,15 +153,15 @@ __export(src_exports, {
153
153
  async function runViteBuild(options) {
154
154
  let result;
155
155
  const currentDir = process.cwd();
156
- const baseName = "index";
157
156
  try {
158
157
  result = await (0, import_vite.build)({
159
158
  plugins: [(0, import_vite_plugin_vue2.createVuePlugin)()],
160
159
  build: {
161
160
  lib: {
162
161
  entry: (0, import_path.resolve)(currentDir, options.entry),
163
- formats: ["es"],
164
- fileName: () => `${baseName}.js`
162
+ formats: ["iife"],
163
+ name: "kirbyupExport",
164
+ fileName: () => outFile
165
165
  },
166
166
  minify: !options.watch,
167
167
  outDir: currentDir,
@@ -169,7 +169,7 @@ async function runViteBuild(options) {
169
169
  rollupOptions: {
170
170
  external: ["vue"],
171
171
  output: {
172
- assetFileNames: `${baseName}.[ext]`,
172
+ assetFileNames: "index.[ext]",
173
173
  globals: {
174
174
  vue: "Vue"
175
175
  }
@@ -201,7 +201,7 @@ async function build(_options) {
201
201
  const { watch } = await import("chokidar");
202
202
  const ignored = [
203
203
  "**/{.git,node_modules}/**",
204
- "index.js"
204
+ outFile
205
205
  ];
206
206
  const watchPaths = typeof options.watch === "boolean" ? (0, import_path.dirname)(options.entry) : Array.isArray(options.watch) ? options.watch.filter((path) => typeof path === "string") : options.watch;
207
207
  log(`Watching for changes in ${Array.isArray(watchPaths) ? watchPaths.map((v) => '"' + v + '"').join(" | ") : '"' + watchPaths + '"'}`);
@@ -218,7 +218,7 @@ async function build(_options) {
218
218
  await runViteBuild(options);
219
219
  startWatcher();
220
220
  }
221
- var import_path, import_fs, import_vite, import_vite_plugin_vue2, import_chalk3, normalizeOptions;
221
+ var import_path, import_fs, import_vite, import_vite_plugin_vue2, import_chalk3, outFile, normalizeOptions;
222
222
  var init_src = __esm({
223
223
  "src/index.ts"() {
224
224
  init_cjs_shims();
@@ -231,6 +231,7 @@ var init_src = __esm({
231
231
  init_log();
232
232
  init_package();
233
233
  import_chalk3 = __toModule(require("chalk"));
234
+ outFile = "index.js";
234
235
  normalizeOptions = async (options) => {
235
236
  if (!options.entry) {
236
237
  throw new PrettyError(`No input file, try "${name} <path/to/file.js>"`);
package/dist/index.js CHANGED
@@ -91,7 +91,7 @@ var import_chalk2 = __toModule(require("chalk"));
91
91
 
92
92
  // package.json
93
93
  var name = "kirbyup";
94
- var version = "0.9.2";
94
+ var version = "0.9.3";
95
95
 
96
96
  // src/log.ts
97
97
  var colorMap = new Map([
@@ -114,18 +114,19 @@ function log(message, type = "info") {
114
114
 
115
115
  // src/index.ts
116
116
  var import_chalk3 = __toModule(require("chalk"));
117
+ var outFile = "index.js";
117
118
  async function runViteBuild(options) {
118
119
  let result;
119
120
  const currentDir = process.cwd();
120
- const baseName = "index";
121
121
  try {
122
122
  result = await (0, import_vite.build)({
123
123
  plugins: [(0, import_vite_plugin_vue2.createVuePlugin)()],
124
124
  build: {
125
125
  lib: {
126
126
  entry: (0, import_path.resolve)(currentDir, options.entry),
127
- formats: ["es"],
128
- fileName: () => `${baseName}.js`
127
+ formats: ["iife"],
128
+ name: "kirbyupExport",
129
+ fileName: () => outFile
129
130
  },
130
131
  minify: !options.watch,
131
132
  outDir: currentDir,
@@ -133,7 +134,7 @@ async function runViteBuild(options) {
133
134
  rollupOptions: {
134
135
  external: ["vue"],
135
136
  output: {
136
- assetFileNames: `${baseName}.[ext]`,
137
+ assetFileNames: "index.[ext]",
137
138
  globals: {
138
139
  vue: "Vue"
139
140
  }
@@ -174,7 +175,7 @@ async function build(_options) {
174
175
  const { watch } = await import("chokidar");
175
176
  const ignored = [
176
177
  "**/{.git,node_modules}/**",
177
- "index.js"
178
+ outFile
178
179
  ];
179
180
  const watchPaths = typeof options.watch === "boolean" ? (0, import_path.dirname)(options.entry) : Array.isArray(options.watch) ? options.watch.filter((path) => typeof path === "string") : options.watch;
180
181
  log(`Watching for changes in ${Array.isArray(watchPaths) ? watchPaths.map((v) => '"' + v + '"').join(" | ") : '"' + watchPaths + '"'}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kirbyup",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "Zero-config bundler for Kirby Panel plugins",
5
5
  "files": [
6
6
  "dist"