@mndw/cli 0.1.2 → 0.1.4

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
@@ -1,13 +1,34 @@
1
1
  # @mndw/cli
2
2
 
3
- The `mndw` command creates, validates, packs, and runs development sessions for MNDW plugins.
3
+ Command-line tools to create, validate, develop, and package mndw plugins.
4
+
5
+ ## Part of mndw
6
+
7
+ mndw is a modular web dashboard for Keenetic/Netcraze routers. Everything in it is a plugin: a dashboard widget or a full page. See [the plugin author site](https://eralde.github.io/mndw/).
8
+
9
+ ## Install and create a plugin
4
10
 
5
11
  ```sh
12
+ mkdir my-plugins && cd my-plugins
13
+ npm init -y
6
14
  npm i -D @mndw/cli
7
15
  npx mndw create my-widget
8
- cd my-widget
9
- npx mndw dev --addr http://router.lan
16
+ npx mndw dev my-widget --addr http://router.lan
10
17
  ```
11
18
 
12
- See the [plugin author site](https://eralde.github.io/mndw/) for tutorials,
13
- validation, packaging, and local development details.
19
+ Run commands from the plugins project and pass each plugin folder as an argument. The CLI installs the matching
20
+ platform `mndwd` binary automatically as an optional dependency.
21
+
22
+ ## Commands
23
+
24
+ | Command | Purpose | Guide |
25
+ | --- | --- | --- |
26
+ | `create` | `npx mndw create <name>` scaffolds a widget or page. | [Project setup](https://eralde.github.io/mndw/guides/project-setup) |
27
+ | `dev` | `npx mndw dev <plugin-dir>` starts a local development session. | [Local development](https://eralde.github.io/mndw/guides/local-development) |
28
+ | `validate` | `npx mndw validate <plugin-dir>` checks manifest, entry, and locale catalogs. | [Validation and packaging](https://eralde.github.io/mndw/guides/validation-and-packaging) |
29
+ | `pack` | `npx mndw pack <plugin-dir>` builds the frontend and stages runtime files. | [Validation and packaging](https://eralde.github.io/mndw/guides/validation-and-packaging) |
30
+ | `zip` | `npx mndw zip <plugin-dir>` creates an upload archive. | [Validation and packaging](https://eralde.github.io/mndw/guides/validation-and-packaging) |
31
+
32
+ ## Read on
33
+
34
+ See the [CLI reference](https://eralde.github.io/mndw/reference/cli), [plugin setup](https://eralde.github.io/mndw/guides/project-setup), and [local development guide](https://eralde.github.io/mndw/guides/local-development).
package/dist/meta.json CHANGED
@@ -1010,7 +1010,7 @@
1010
1010
  "format": "esm"
1011
1011
  },
1012
1012
  "src/pack.ts": {
1013
- "bytes": 19934,
1013
+ "bytes": 20047,
1014
1014
  "imports": [
1015
1015
  {
1016
1016
  "path": "node:crypto",
@@ -1797,7 +1797,7 @@
1797
1797
  "bytesInOutput": 4446
1798
1798
  },
1799
1799
  "src/pack.ts": {
1800
- "bytesInOutput": 14434
1800
+ "bytesInOutput": 14542
1801
1801
  },
1802
1802
  "src/angular-compiler.ts": {
1803
1803
  "bytesInOutput": 266
@@ -1815,7 +1815,7 @@
1815
1815
  "bytesInOutput": 1982
1816
1816
  }
1817
1817
  },
1818
- "bytes": 142658
1818
+ "bytes": 142766
1819
1819
  }
1820
1820
  }
1821
1821
  }
package/dist/mndw.js CHANGED
@@ -600,7 +600,7 @@ var SHARED_DEPENDENCIES = [
600
600
  {
601
601
  specifiers: ["@mndw/ui"],
602
602
  bundle: "mndw-ui",
603
- version: "0.1.2",
603
+ version: "0.1.4",
604
604
  entryPoint: "@mndw/ui",
605
605
  external: ["d3"],
606
606
  framework: "base"
@@ -3444,7 +3444,10 @@ async function packPlugin(pluginDir, options = {}) {
3444
3444
  warningFilter: (warning) => !(0, import_svelte_compiler_options.isMndwButtonA11yWarning)(warning)
3445
3445
  }
3446
3446
  })
3447
- ] : framework === "vue" ? [vuePlugin({ sourceMap: false })] : []
3447
+ ] : framework === "vue" ? [vuePlugin({
3448
+ sourceMap: false,
3449
+ template: { compilerOptions: { isCustomElement: (tag) => tag.startsWith("mndw-") } }
3450
+ })] : []
3448
3451
  });
3449
3452
  const jsOutputs = result.outputFiles.filter((file) => file.path.endsWith(".js"));
3450
3453
  const jsOutput = jsOutputs.find((file) => file.path === join12(outDir, "index.js")) ?? jsOutputs[0];