diff --git a/packages/create-angular/package.json b/packages/create-angular/package.json index 02238f6..f402499 100644 --- a/packages/create-angular/package.json +++ b/packages/create-angular/package.json @@ -2,6 +2,7 @@ "name": "@carto/create-angular", "private": true, "version": "0.0.0", + "type": "module", "scripts": { "ng": "ng", "dev": "ng serve --port 4000", diff --git a/packages/create-angular/scripts/create.js b/packages/create-angular/scripts/create.js index 84ae697..2470ebc 100644 --- a/packages/create-angular/scripts/create.js +++ b/packages/create-angular/scripts/create.js @@ -1 +1,21 @@ -console.log('angular::create') +#!/usr/bin/env node +import { resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { createProject } from '@carto/create-common'; +import meow from 'meow'; + +const cli = meow( + ` + Usage + $ yarn create @carto/angular + `, + { + importMeta: import.meta, + autoHelp: true, + autoVersion: true, + }, +); + +const templateDir = resolve(fileURLToPath(import.meta.url), '../..'); +const targetDir = cli.input.at(0) || '.'; +await createProject(templateDir, targetDir); diff --git a/packages/create-vue/scripts/create.js b/packages/create-vue/scripts/create.js index 0ddde44..eb2e52e 100644 --- a/packages/create-vue/scripts/create.js +++ b/packages/create-vue/scripts/create.js @@ -1 +1,21 @@ -console.log('vue::create') +#!/usr/bin/env node +import { resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { createProject } from '@carto/create-common'; +import meow from 'meow'; + +const cli = meow( + ` + Usage + $ yarn create @carto/vue + `, + { + importMeta: import.meta, + autoHelp: true, + autoVersion: true, + }, +); + +const templateDir = resolve(fileURLToPath(import.meta.url), '../..'); +const targetDir = cli.input.at(0) || '.'; +await createProject(templateDir, targetDir);