diff --git a/packages/cli/dist/index.d.ts b/packages/cli/dist/index.d.ts new file mode 100644 index 00000000..223e65e8 --- /dev/null +++ b/packages/cli/dist/index.d.ts @@ -0,0 +1,2 @@ + +export { } diff --git a/packages/cli/dist/index.js b/packages/cli/dist/index.js new file mode 100644 index 00000000..016cb65e --- /dev/null +++ b/packages/cli/dist/index.js @@ -0,0 +1,2 @@ +function o(){console.log("Hello, world! cli")}o(); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/cli/dist/index.js.map b/packages/cli/dist/index.js.map new file mode 100644 index 00000000..f0f86099 --- /dev/null +++ b/packages/cli/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// import { example } from \"@/src/commands/example\";\nimport { Command } from \"commander\";\n\nfunction main() {\n console.log(\"Hello, world! cli\");\n\n // const program = new Command()\n // .name(\"cli\")\n // .description(\"A simple CLI template\")\n // .version(version || \"0.0.0\");\n\n // program.addCommand(example);\n\n // program.parse();\n}\n\nmain();\n"],"mappings":"AAGA,SAASA,GAAO,CACd,QAAQ,IAAI,mBAAmB,CAUjC,CAEAA,EAAK","names":["main"]} \ No newline at end of file diff --git a/packages/cli/package.json b/packages/cli/package.json new file mode 100644 index 00000000..71544b54 --- /dev/null +++ b/packages/cli/package.json @@ -0,0 +1,35 @@ +{ + "name": "@shared/cli", + "version": "0.0.0", + "description": "CLI tool", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "type": "module", + "main": "dist/index.js", + "bin": "dist/index.js", + "types": "dist/index.d.ts", + "exports": "./dist/index.js", + "files": [ + "dist" + ], + "scripts": { + "build": "tsup", + "start": "node dist/index.js" + }, + "devDependencies": { + "@shared/eslint-config": "workspace:*", + "@shared/ts-config": "workspace:*", + "@types/node": "^20.10.6", + "tsup": "^8.0.1", + "type-fest": "^4.10.1", + "typescript": "^5.3.3", + "vitest": "^1.2.1" + }, + "dependencies": { + "inquirer": "^12.0.0", + "open": "^10.1.0", + "ora": "^8.1.0" + } +} diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts new file mode 100644 index 00000000..58229e6a --- /dev/null +++ b/packages/cli/src/index.ts @@ -0,0 +1,17 @@ +// import { example } from "@/src/commands/example"; +import { Command } from "commander"; + +function main() { + console.log("Hello, world! cli"); + + // const program = new Command() + // .name("cli") + // .description("A simple CLI template") + // .version(version || "0.0.0"); + + // program.addCommand(example); + + // program.parse(); +} + +main(); diff --git a/packages/cli/tsconfig.ts b/packages/cli/tsconfig.ts new file mode 100644 index 00000000..37e2f7d2 --- /dev/null +++ b/packages/cli/tsconfig.ts @@ -0,0 +1,12 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "isolatedModules": false, + "baseUrl": ".", + "paths": { + "@/*": ["./*"], + }, + }, + "include": ["src/**/*.ts"], + "exclude": ["node_modules", "dist"], + } \ No newline at end of file diff --git a/packages/cli/tsup.config.ts b/packages/cli/tsup.config.ts new file mode 100644 index 00000000..ce6ccafa --- /dev/null +++ b/packages/cli/tsup.config.ts @@ -0,0 +1,12 @@ +import { defineConfig } from "tsup"; + +export default defineConfig({ + format: "esm", + target: "esnext", + dts: true, + clean: true, + sourcemap: true, + minify: true, + entry: ["src/index.ts"], + outDir: "dist", +});