@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 +26 -5
- package/dist/meta.json +3 -3
- package/dist/mndw.js +5 -2
- package/host-dev/assets/{index-Bks-EVsE.js → index-CwQLpAUa.js} +3 -3
- package/host-dev/assets/index-D8Vmvhf6.css +1 -0
- package/host-dev/assets/{sandbox-url-0nkeUf58.js → sandbox-url-BRfzhk02.js} +1 -1
- package/host-dev/assets/{sprite-DIkKar2y.svg → sprite-qQ7EZWXN.svg} +6 -0
- package/host-dev/index.html +3 -3
- package/host-dev/shared/{mndw-ui@0.1.2.js → mndw-ui@0.1.4.js} +255 -141
- package/package.json +14 -13
- package/host-dev/assets/index-TmL5gfki.css +0 -1
package/README.md
CHANGED
|
@@ -1,13 +1,34 @@
|
|
|
1
1
|
# @mndw/cli
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
9
|
-
npx mndw dev --addr http://router.lan
|
|
16
|
+
npx mndw dev my-widget --addr http://router.lan
|
|
10
17
|
```
|
|
11
18
|
|
|
12
|
-
|
|
13
|
-
|
|
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":
|
|
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":
|
|
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":
|
|
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.
|
|
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({
|
|
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];
|