diff --git a/packages/cli-tool/src/template/initialize-vite-app.ts b/packages/cli-tool/src/template/initialize-vite-app.ts index 062e7f2..43ee285 100644 --- a/packages/cli-tool/src/template/initialize-vite-app.ts +++ b/packages/cli-tool/src/template/initialize-vite-app.ts @@ -5,12 +5,14 @@ import runCommand from '../helpers/child-process'; import { replaceLine } from '../helpers/file-editor'; import { CopyStrategy, DownloadStrategy } from './fetchingStrategy'; -const replaceAppNameInFiles = ['package.json', 'index.html']; +const replaceAppNameInFiles = ['index.html']; +const replcaeNimbleNameInFiles = ['package.json']; const fetchTemplateFiles = (options: InitTemplateOptions): Promise => { let fetchStrategy: CopyStrategy | DownloadStrategy; // If passed templateReference in CLI, use the DownloadStrategy + // TODO: Decide if we want to keep DownloadStrategy long-term if (options.templateReference && options.templateReference.trim() === '') { fetchStrategy = new DownloadStrategy(); } else { @@ -30,6 +32,14 @@ const replaceAppName = (options: InitTemplateOptions): void => { options.appName, ); }); + + replcaeNimbleNameInFiles.forEach((fileName) => { + replaceLine( + `${options.dest}${options.appName}/${fileName}`, + 'nimble-vite-template', + options.appName, + ); + }); }; const npmInstall = (options: InitTemplateOptions): Promise => { diff --git a/packages/vite-template/package.json b/packages/vite-template/package.json index 8019520..61373ae 100644 --- a/packages/vite-template/package.json +++ b/packages/vite-template/package.json @@ -1,5 +1,5 @@ { - "name": "vite-template", + "name": "nimble-vite-template", "version": "0.1.0", "private": true, "dependencies": {