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"
|
"web-component-base": "latest"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"mcfly": "index.js"
|
"mcfly": "index.mjs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"packages/config": {
|
"packages/config": {
|
||||||
"name": "@mcflyjs/config",
|
"name": "@mcflyjs/config",
|
||||||
"version": "0.0.7",
|
"version": "0.0.8",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {}
|
"devDependencies": {}
|
||||||
},
|
},
|
||||||
"packages/core": {
|
"packages/core": {
|
||||||
"name": "@mcflyjs/core",
|
"name": "@mcflyjs/core",
|
||||||
"version": "0.2.7",
|
"version": "0.2.8",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esprima": "^4.0.1",
|
"esprima": "^4.0.1",
|
||||||
|
@ -3998,14 +3998,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"packages/create-mcfly": {
|
"packages/create-mcfly": {
|
||||||
"version": "0.3.1",
|
"version": "0.3.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"consola": "^3.2.3",
|
"consola": "^3.2.3",
|
||||||
"giget": "^1.1.3"
|
"giget": "^1.1.3"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"create-mcfly": "index.js"
|
"create-mcfly": "index.mjs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"site": {
|
"site": {
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
"build:preview": "npm run build:preview -w @mcflyjs/landing-page",
|
"build:preview": "npm run build:preview -w @mcflyjs/landing-page",
|
||||||
"template:basic": "npm run dev -w @templates/basic",
|
"template:basic": "npm run dev -w @templates/basic",
|
||||||
"create": "node ./packages/create-mcfly",
|
"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"
|
"patch:all": "npm version patch -w @mcflyjs/core && npm version patch -w @mcflyjs/config && npm version patch -w create-mcfly"
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
const { defineCommand, runMain } = require("citty");
|
import { defineCommand, runMain } from "citty";
|
||||||
const pkg = require("./package.json");
|
|
||||||
|
|
||||||
const main = defineCommand({
|
const main = defineCommand({
|
||||||
meta: {
|
meta: {
|
||||||
name: "mcfly",
|
name: "mcfly",
|
||||||
description: "McFly CLI",
|
description: "McFly CLI",
|
||||||
version: pkg.version,
|
|
||||||
},
|
},
|
||||||
subCommands: {
|
subCommands: {
|
||||||
new: () => import("./commands/new.mjs").then((r) => r.default),
|
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),
|
build: () => import("./commands/build.mjs").then((r) => r.default),
|
||||||
prepare: () => import("./commands/prepare.mjs").then((r) => r.default),
|
prepare: () => import("./commands/prepare.mjs").then((r) => r.default),
|
||||||
generate: () => import("./commands/generate.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",
|
"name": "@mcflyjs/cli",
|
||||||
"version": "0.0.7",
|
"version": "0.0.8",
|
||||||
"description": "McFly CLI tools",
|
"description": "McFly CLI tools",
|
||||||
"main": "index.js",
|
"type": "module",
|
||||||
|
"main": "index.mjs",
|
||||||
"bin": {
|
"bin": {
|
||||||
"mcfly": "./index.js"
|
"mcfly": "./index.mjs"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@mcflyjs/config",
|
"name": "@mcflyjs/config",
|
||||||
"version": "0.0.7",
|
"version": "0.0.9",
|
||||||
"description": "Nitro configuration for McFly apps",
|
"description": "Nitro configuration for McFly apps",
|
||||||
"main": "index.js",
|
"type": "module",
|
||||||
|
"main": "index.mjs",
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.mjs",
|
||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
"name": "@mcflyjs/core",
|
"name": "@mcflyjs/core",
|
||||||
"version": "0.2.7",
|
"version": "0.2.8",
|
||||||
"description": "McFly core package",
|
"description": "McFly core package",
|
||||||
|
"type": "module",
|
||||||
"main": "event-handler.mjs",
|
"main": "event-handler.mjs",
|
||||||
"files": [
|
"files": [
|
||||||
"event-handler.mjs",
|
"event-handler.mjs",
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
const { consola } = require("consola");
|
import { consola } from "consola";
|
||||||
const { colorize } = require("consola/utils");
|
import { colorize } from "consola/utils";
|
||||||
const { downloadTemplate } = require("giget");
|
import { downloadTemplate } from "giget";
|
||||||
const { execSync: exec } = require("node:child_process");
|
import { execSync as exec } from "node:child_process";
|
||||||
|
|
||||||
const [, , directoryArg] = process.argv;
|
const [, , directoryArg] = process.argv;
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ const [, , directoryArg] = process.argv;
|
||||||
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")}!`);
|
||||||
let directory = directoryArg;
|
let directory = directoryArg;
|
||||||
|
|
||||||
if (!directory) {
|
if (!directory) {
|
|
@ -1,16 +1,17 @@
|
||||||
{
|
{
|
||||||
"name": "create-mcfly",
|
"name": "create-mcfly",
|
||||||
"version": "0.3.1",
|
"version": "0.3.2",
|
||||||
"bin": {
|
|
||||||
"create-mcfly": "./index.js"
|
|
||||||
},
|
|
||||||
"description": "Create a new McFly app",
|
"description": "Create a new McFly app",
|
||||||
"main": "index.js",
|
"type": "module",
|
||||||
|
"bin": {
|
||||||
|
"create-mcfly": "./index.mjs"
|
||||||
|
},
|
||||||
|
"main": "index.mjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./index.js"
|
".": "./index.mjs"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.mjs",
|
||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in a new issue