@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-
|
|
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
package/src/createWidget.ts
CHANGED
|
@@ -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() {
|