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": {
|
||||
"version": "0.2.11",
|
||||
"version": "0.2.12",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"consola": "^3.2.3",
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
// @ts-check
|
||||
import { consola } from "consola";
|
||||
import { colorize } from "consola/utils";
|
||||
import { downloadTemplate } from "giget";
|
||||
import { execSync as exec } from "node:child_process";
|
||||
const { consola } = require("consola");
|
||||
const { colorize } = require("consola/utils");
|
||||
const { downloadTemplate } = require("giget");
|
||||
const { execSync: exec } = require("node:child_process");
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
|
@ -18,7 +18,7 @@ import { execSync as exec } from "node:child_process";
|
|||
/**
|
||||
* Create McFly App
|
||||
*/
|
||||
export async function create() {
|
||||
async function create() {
|
||||
console.clear();
|
||||
const defaultDirectory = "./mcfly-app";
|
||||
consola.box(`👋 Hello! Welcome to ${colorize("bold", "McFly")}!`);
|
||||
|
@ -144,3 +144,5 @@ function showResults(directory, installDeps) {
|
|||
|
||||
consola.box(result);
|
||||
}
|
||||
|
||||
create();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "create-mcfly",
|
||||
"version": "0.2.11",
|
||||
"version": "0.2.12",
|
||||
"bin": {
|
||||
"create-mcfly": "./index.js"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue