fix(create-mcfly): imports not allowed in non-module js
This commit is contained in:
parent
f1681d2c63
commit
0124a9249f
3 changed files with 9 additions and 7 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -3975,7 +3975,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"packages/create-mcfly": {
|
"packages/create-mcfly": {
|
||||||
"version": "0.2.11",
|
"version": "0.2.12",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"consola": "^3.2.3",
|
"consola": "^3.2.3",
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
// @ts-check
|
// @ts-check
|
||||||
import { consola } from "consola";
|
const { consola } = require("consola");
|
||||||
import { colorize } from "consola/utils";
|
const { colorize } = require("consola/utils");
|
||||||
import { downloadTemplate } from "giget";
|
const { downloadTemplate } = require("giget");
|
||||||
import { execSync as exec } from "node:child_process";
|
const { execSync: exec } = require("node:child_process");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {{
|
* @typedef {{
|
||||||
|
@ -18,7 +18,7 @@ import { execSync as exec } from "node:child_process";
|
||||||
/**
|
/**
|
||||||
* Create McFly App
|
* Create McFly App
|
||||||
*/
|
*/
|
||||||
export async function create() {
|
async function create() {
|
||||||
console.clear();
|
console.clear();
|
||||||
const defaultDirectory = "./mcfly-app";
|
const defaultDirectory = "./mcfly-app";
|
||||||
consola.box(`👋 Hello! Welcome to ${colorize("bold", "McFly")}!`);
|
consola.box(`👋 Hello! Welcome to ${colorize("bold", "McFly")}!`);
|
||||||
|
@ -144,3 +144,5 @@ function showResults(directory, installDeps) {
|
||||||
|
|
||||||
consola.box(result);
|
consola.box(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
create();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "create-mcfly",
|
"name": "create-mcfly",
|
||||||
"version": "0.2.11",
|
"version": "0.2.12",
|
||||||
"bin": {
|
"bin": {
|
||||||
"create-mcfly": "./index.js"
|
"create-mcfly": "./index.js"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue