chore(packages): esm all-the-way
This commit is contained in:
parent
5f4019cf0f
commit
27237f7e9f
9 changed files with 31 additions and 27 deletions
10
package-lock.json
generated
10
package-lock.json
generated
|
@ -3978,18 +3978,18 @@
|
|||
"web-component-base": "latest"
|
||||
},
|
||||
"bin": {
|
||||
"mcfly": "index.js"
|
||||
"mcfly": "index.mjs"
|
||||
}
|
||||
},
|
||||
"packages/config": {
|
||||
"name": "@mcflyjs/config",
|
||||
"version": "0.0.7",
|
||||
"version": "0.0.8",
|
||||
"license": "MIT",
|
||||
"devDependencies": {}
|
||||
},
|
||||
"packages/core": {
|
||||
"name": "@mcflyjs/core",
|
||||
"version": "0.2.7",
|
||||
"version": "0.2.8",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"esprima": "^4.0.1",
|
||||
|
@ -3998,14 +3998,14 @@
|
|||
}
|
||||
},
|
||||
"packages/create-mcfly": {
|
||||
"version": "0.3.1",
|
||||
"version": "0.3.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"consola": "^3.2.3",
|
||||
"giget": "^1.1.3"
|
||||
},
|
||||
"bin": {
|
||||
"create-mcfly": "index.js"
|
||||
"create-mcfly": "index.mjs"
|
||||
}
|
||||
},
|
||||
"site": {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"build:preview": "npm run build:preview -w @mcflyjs/landing-page",
|
||||
"template:basic": "npm run dev -w @templates/basic",
|
||||
"create": "node ./packages/create-mcfly",
|
||||
"cli": "node ./packages/cli",
|
||||
"patch:all": "npm version patch -w @mcflyjs/core && npm version patch -w @mcflyjs/config && npm version patch -w create-mcfly"
|
||||
},
|
||||
"workspaces": [
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
#!/usr/bin/env node
|
||||
const { defineCommand, runMain } = require("citty");
|
||||
const pkg = require("./package.json");
|
||||
import { defineCommand, runMain } from "citty";
|
||||
|
||||
const main = defineCommand({
|
||||
meta: {
|
||||
name: "mcfly",
|
||||
description: "McFly CLI",
|
||||
version: pkg.version,
|
||||
},
|
||||
subCommands: {
|
||||
new: () => import("./commands/new.mjs").then((r) => r.default),
|
||||
|
@ -14,6 +12,7 @@ const main = defineCommand({
|
|||
build: () => import("./commands/build.mjs").then((r) => r.default),
|
||||
prepare: () => import("./commands/prepare.mjs").then((r) => r.default),
|
||||
generate: () => import("./commands/generate.mjs").then((r) => r.default),
|
||||
g: () => import("./commands/generate.mjs").then((r) => r.default),
|
||||
},
|
||||
});
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
{
|
||||
"name": "@mcflyjs/cli",
|
||||
"version": "0.0.7",
|
||||
"version": "0.0.8",
|
||||
"description": "McFly CLI tools",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"main": "index.mjs",
|
||||
"bin": {
|
||||
"mcfly": "./index.js"
|
||||
"mcfly": "./index.mjs"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
"name": "@mcflyjs/config",
|
||||
"version": "0.0.7",
|
||||
"version": "0.0.9",
|
||||
"description": "Nitro configuration for McFly apps",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"main": "index.mjs",
|
||||
"devDependencies": {},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.mjs",
|
||||
"LICENSE"
|
||||
],
|
||||
"scripts": {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"name": "@mcflyjs/core",
|
||||
"version": "0.2.7",
|
||||
"version": "0.2.8",
|
||||
"description": "McFly core package",
|
||||
"type": "module",
|
||||
"main": "event-handler.mjs",
|
||||
"files": [
|
||||
"event-handler.mjs",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const { consola } = require("consola");
|
||||
const { colorize } = require("consola/utils");
|
||||
const { downloadTemplate } = require("giget");
|
||||
const { execSync: exec } = require("node:child_process");
|
||||
import { consola } from "consola";
|
||||
import { colorize } from "consola/utils";
|
||||
import { downloadTemplate } from "giget";
|
||||
import { execSync as exec } from "node:child_process";
|
||||
|
||||
const [, , directoryArg] = process.argv;
|
||||
|
||||
|
@ -22,7 +22,7 @@ const [, , directoryArg] = process.argv;
|
|||
async function create() {
|
||||
console.clear();
|
||||
const defaultDirectory = "./mcfly-app";
|
||||
consola.box(`👋 Hello! Welcome to ${colorize("bold", "McFly")}!`);
|
||||
consola.box(`Hello! Welcome to ${colorize("bold", "McFly")}!`);
|
||||
let directory = directoryArg;
|
||||
|
||||
if (!directory) {
|
|
@ -1,16 +1,17 @@
|
|||
{
|
||||
"name": "create-mcfly",
|
||||
"version": "0.3.1",
|
||||
"bin": {
|
||||
"create-mcfly": "./index.js"
|
||||
},
|
||||
"version": "0.3.2",
|
||||
"description": "Create a new McFly app",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"create-mcfly": "./index.mjs"
|
||||
},
|
||||
"main": "index.mjs",
|
||||
"exports": {
|
||||
".": "./index.js"
|
||||
".": "./index.mjs"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.mjs",
|
||||
"LICENSE"
|
||||
],
|
||||
"scripts": {
|
||||
|
|
Loading…
Reference in a new issue