@widget-js/cli 1.2.9-rc.3 → 1.2.9-rc.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/lib/index.js CHANGED
@@ -20,7 +20,7 @@ program.command("dependencies").description("Set @widget-js dependencies to loca
20
20
  await dependencies.default(options);
21
21
  });
22
22
  program.command("init").description("Initialize widget-js project").action(async () => {
23
- const init = await import("./init-QWD6RW77.js");
23
+ const init = await import("./init-UTMWSRE4.js");
24
24
  await init.init();
25
25
  });
26
26
  var typeOption = new Option("-t, --type <type>").choices(["ftp", "oss"]);
@@ -18,6 +18,9 @@ import consola from "consola";
18
18
  import chalk from "chalk";
19
19
  import ora from "ora";
20
20
  import { scanWidgetPackage } from "@widget-js/utils";
21
+ import { fileURLToPath } from "url";
22
+ var __filename = fileURLToPath(import.meta.url);
23
+ var __dirname = path.dirname(__filename);
21
24
  var spinner = ora("Loading");
22
25
  async function init() {
23
26
  await addDependencies();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widget-js/cli",
3
- "version": "1.2.9-rc.3",
3
+ "version": "1.2.9-rc.4",
4
4
  "main": "lib/index.js",
5
5
  "author": "Neo Fu",
6
6
  "license": "MIT",
@@ -13,7 +13,6 @@ import {EJSUtils} from './utils/EJSUtils'
13
13
  import {WidgetPackageUtils} from "./utils/WidgetPackageUtils";
14
14
  // import vm from "vm";
15
15
  const __filename = fileURLToPath(import.meta.url)
16
-
17
16
  const __dirname = path.dirname(__filename)
18
17
 
19
18
  interface RenderOptions {
package/src/init/init.ts CHANGED
@@ -10,7 +10,9 @@ import ora from 'ora'
10
10
  import {PrettierUtils} from '../utils/PrettierUtils'
11
11
  import {scanWidgetPackage} from '@widget-js/utils'
12
12
  import {WidgetPackageUtils} from '../utils/WidgetPackageUtils'
13
-
13
+ import {fileURLToPath} from "url";
14
+ const __filename = fileURLToPath(import.meta.url)
15
+ const __dirname = path.dirname(__filename)
14
16
  const spinner = ora('Loading')
15
17
 
16
18
  export async function init() {
@@ -7,6 +7,7 @@ export default new WidgetPackage({
7
7
  'zh-CN': '修改成你的组件描述',
8
8
  },
9
9
  entry: 'index.html',
10
+ hash: false,
10
11
  homepage: '',
11
12
  name: '<%= name %>',
12
13
  title: {