@widget-js/cli 1.2.1 → 1.2.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.
@@ -0,0 +1,64 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <code_scheme name="Project" version="173">
3
+ <HTMLCodeStyleSettings>
4
+ <option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
5
+ <option name="HTML_ENFORCE_QUOTES" value="true" />
6
+ </HTMLCodeStyleSettings>
7
+ <JSCodeStyleSettings version="0">
8
+ <option name="FORCE_SEMICOLON_STYLE" value="true" />
9
+ <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
10
+ <option name="FORCE_QUOTE_STYlE" value="true" />
11
+ <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
12
+ <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
13
+ <option name="SPACES_WITHIN_IMPORTS" value="true" />
14
+ </JSCodeStyleSettings>
15
+ <JetCodeStyleSettings>
16
+ <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
17
+ </JetCodeStyleSettings>
18
+ <TypeScriptCodeStyleSettings version="0">
19
+ <option name="FORCE_SEMICOLON_STYLE" value="true" />
20
+ <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
21
+ <option name="FORCE_QUOTE_STYlE" value="true" />
22
+ <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
23
+ <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
24
+ <option name="SPACES_WITHIN_IMPORTS" value="true" />
25
+ </TypeScriptCodeStyleSettings>
26
+ <VueCodeStyleSettings>
27
+ <option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
28
+ <option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
29
+ </VueCodeStyleSettings>
30
+ <codeStyleSettings language="HTML">
31
+ <option name="SOFT_MARGINS" value="80" />
32
+ <indentOptions>
33
+ <option name="INDENT_SIZE" value="2" />
34
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
35
+ <option name="TAB_SIZE" value="2" />
36
+ </indentOptions>
37
+ </codeStyleSettings>
38
+ <codeStyleSettings language="JavaScript">
39
+ <option name="SOFT_MARGINS" value="80" />
40
+ <indentOptions>
41
+ <option name="INDENT_SIZE" value="2" />
42
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
43
+ <option name="TAB_SIZE" value="2" />
44
+ </indentOptions>
45
+ </codeStyleSettings>
46
+ <codeStyleSettings language="TypeScript">
47
+ <option name="SOFT_MARGINS" value="80" />
48
+ <indentOptions>
49
+ <option name="INDENT_SIZE" value="2" />
50
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
51
+ <option name="TAB_SIZE" value="2" />
52
+ </indentOptions>
53
+ </codeStyleSettings>
54
+ <codeStyleSettings language="Vue">
55
+ <option name="SOFT_MARGINS" value="80" />
56
+ <indentOptions>
57
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
58
+ </indentOptions>
59
+ </codeStyleSettings>
60
+ <codeStyleSettings language="kotlin">
61
+ <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
62
+ </codeStyleSettings>
63
+ </code_scheme>
64
+ </component>
@@ -0,0 +1,5 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <state>
3
+ <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
+ </state>
5
+ </component>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="PrettierConfiguration">
4
+ <option name="myConfigurationMode" value="AUTOMATIC" />
5
+ </component>
6
+ </project>
@@ -165,7 +165,6 @@ async function createWidget() {
165
165
  const widgetViewFile = path.resolve(widgetDir, `${name}WidgetView.vue`);
166
166
  const widgetRoutesFile = path.resolve(widgetDir, `${name}WidgetRoutes.ts`);
167
167
  EJSUtils.renderToFile("WidgetDefine.ejs", widgetDefineFile, "typescript", renderOptions);
168
- EJSUtils.renderToFile("Widget.ejs", widgetFile, "vue", renderOptions);
169
168
  EJSUtils.renderToFile("WidgetView.ejs", widgetViewFile, "vue", renderOptions);
170
169
  EJSUtils.renderToFile("WidgetRoutes.ejs", widgetRoutesFile, "typescript", renderOptions);
171
170
  if (configurable) {
package/lib/index.js CHANGED
@@ -11,7 +11,7 @@ var cliPackage = JSON.parse(fs.readFileSync(packageJsonPath).toString());
11
11
  console.log(gradient.pastel.multiline(figlet.textSync("widget-cli", { horizontalLayout: "full" })));
12
12
  program.version(`@widget-js/cli ${cliPackage.version}`).usage("<command> [options]");
13
13
  program.command("create").description("Create new widget").action(async () => {
14
- const createWidget = await import("./createWidget-QSHTD2M7.js");
14
+ const createWidget = await import("./createWidget-JW2SST4K.js");
15
15
  await createWidget.default();
16
16
  });
17
17
  var dependenciesOption = new Option("-t, --type <type>").choices(["remote", "local"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widget-js/cli",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "main": "lib/index.js",
5
5
  "author": "Neo Fu",
6
6
  "license": "MIT",
@@ -35,6 +35,7 @@
35
35
  "ora": "^6.2.0",
36
36
  "package-json": "^8.1.0",
37
37
  "semver": "^7.3.8",
38
+ "prettier": "^2.8.8",
38
39
  "shelljs": "^0.8.5",
39
40
  "ssh2-sftp-client": "^9.1.0",
40
41
  "ws": "^8.11.0",
@@ -52,7 +53,6 @@
52
53
  "@types/ssh2-sftp-client": "^9.0.1",
53
54
  "jest": "^29.5.0",
54
55
  "pinst": "^3.0.0",
55
- "prettier": "^2.8.8",
56
56
  "rimraf": "^4.4.1",
57
57
  "ts-jest": "^29.0.3",
58
58
  "ts-loader": "^9.4.1",
package/release.json CHANGED
@@ -2,6 +2,8 @@
2
2
  "fileMap": [
3
3
  ],
4
4
  "ftpConfig": {
5
- "host": ["itime"]
5
+ "host": [
6
+ "itime"
7
+ ]
6
8
  }
7
9
  }
@@ -193,7 +193,7 @@ export default async function createWidget() {
193
193
  const widgetRoutesFile = path.resolve(widgetDir, `${name}WidgetRoutes.ts`)
194
194
 
195
195
  EJSUtils.renderToFile('WidgetDefine.ejs', widgetDefineFile, 'typescript', renderOptions)
196
- EJSUtils.renderToFile('Widget.ejs', widgetFile, 'vue', renderOptions)
196
+ // EJSUtils.renderToFile('Widget.ejs', widgetFile, 'vue', renderOptions)
197
197
  EJSUtils.renderToFile('WidgetView.ejs', widgetViewFile, 'vue', renderOptions)
198
198
  EJSUtils.renderToFile('WidgetRoutes.ejs', widgetRoutesFile, 'typescript', renderOptions)
199
199
  if (configurable) {
@@ -1,12 +1,12 @@
1
1
  <template>
2
- <!-- TODO:组件页面,这里编写组件业务逻辑-->
3
- <<%= paramCaseName %>-widget></<%= paramCaseName %>-widget>
2
+ <widget-wrapper>
3
+ <!-- TODO:组件页面,这里编写组件业务逻辑-->
4
+ </widget-wrapper>
4
5
  </template>
5
6
 
6
7
  <script lang="ts" setup>
7
8
  import {WidgetData} from "@widget-js/core";
8
- import <%= name %>Widget from "./<%= name %>Widget.vue"
9
- import {useWidget} from "@widget-js/vue3";
9
+ import {useWidget,WidgetWrapper} from "@widget-js/vue3";
10
10
 
11
11
  const {widgetData, widgetParams} = useWidget(WidgetData);
12
12
  </script>
@@ -1,11 +0,0 @@
1
- <template>
2
- <!-- TODO 这里只写组件内容,不做自定义数据、业务处理 -->
3
- </template>
4
-
5
- <script lang="ts" setup>
6
-
7
- </script>
8
-
9
- <style scoped>
10
-
11
- </style>