@widget-js/cli 1.0.0 → 1.0.2

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/.idea/vcs.xml CHANGED
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
3
  <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
5
  </component>
6
6
  </project>
package/bin/widget.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widget-js/cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "main": "bin/widget.js",
5
5
  "author": "Neo Fu",
6
6
  "license": "MIT",
@@ -9,17 +9,13 @@
9
9
  "bin": {
10
10
  "widget": "bin/widget.js"
11
11
  },
12
- "scripts": {
13
- "widget": "node ./bin/widget.js"
14
- },
15
12
  "publishConfig": {
16
13
  "access": "public"
17
14
  },
18
15
  "engines": {
19
16
  "node": "^12.0.0 || >= 14.0.0"
20
17
  },
21
- "dependencies": {
22
- },
18
+ "dependencies": {},
23
19
  "devDependencies": {
24
20
  "@vue/cli-shared-utils": "^5.0.8",
25
21
  "change-case": "^4.1.2",
@@ -27,5 +23,8 @@
27
23
  "ejs": "^3.1.8",
28
24
  "inquirer": "^9.1.4",
29
25
  "shelljs": "^0.8.5"
26
+ },
27
+ "scripts": {
28
+ "widget": "node ./bin/widget.js"
30
29
  }
31
- }
30
+ }
package/readme.md ADDED
@@ -0,0 +1,13 @@
1
+ ## Widget CLI
2
+ ### How to install
3
+ ```shell
4
+ npm install --save-dev @widget-js/cli
5
+ ```
6
+ or
7
+ ```shell
8
+ yarn add @widget-js/cli --dev
9
+ ```
10
+ ### Usage
11
+ ```shell
12
+ npx widget
13
+ ```
@@ -18,7 +18,7 @@
18
18
 
19
19
  <script lang="ts">
20
20
 
21
- import <%= name %>Widget from "@/widgets/clock/ClockWidget.vue";
21
+ import <%= name %>Widget from "./<%= name%>Widget.vue";
22
22
  import {useWidget, WidgetConfigOption, WidgetEditDialog} from "@widget-js/vue3";
23
23
  import {WidgetData, WidgetDataRepository} from "@widget-js/core";
24
24
  import {reactive} from "vue";
@@ -3,7 +3,7 @@ import <%= name %>WidgetDefine from "./<%= name %>.widget";
3
3
  const url = <%= name %>WidgetDefine.url;
4
4
  const name = <%= name %>WidgetDefine.name;
5
5
  <% if (configurable) { %>
6
- const configUrl = <%= name %>WidgetDefine.configUrl;
6
+ const configUrl = <%= name %>WidgetDefine.configUrl!;
7
7
 
8
8
  const <%= name %>WidgetRoutes = [
9
9
  {