From 169773632866f48fe315ae7ee36d52273e8f7185 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Fri, 4 Oct 2024 17:20:44 -0400 Subject: [PATCH] Create new 'output' script for a short way to run the generator --- lib/bin/new-app.mjs | 24 ++++++++++++++++++++++++ package.json | 1 + 2 files changed, 25 insertions(+) create mode 100644 lib/bin/new-app.mjs diff --git a/lib/bin/new-app.mjs b/lib/bin/new-app.mjs new file mode 100644 index 0000000..9b1ed36 --- /dev/null +++ b/lib/bin/new-app.mjs @@ -0,0 +1,24 @@ +/** + * Usage: + * + * pnpm output:new [...flags] + * + * Example: + * + * pnpm output --typescript + * + * + */ + +import { newApp } from '../new-app.mjs'; + +const [, , ...args] = process.argv; + +let name = `my-ember-vite-app`; +let info = await newApp({ name, flags: args }); + +console.info(` + + New app created in ${info.dir} + +`); diff --git a/package.json b/package.json index 2e3a3f9..4db6198 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "scripts": { "lint": "eslint .", "test": "vitest", + "output": "node ./lib/bin/new-app.mjs", "output:fixture": "node ./lib/bin/output-fixture.mjs" }, "dependencies": {