@@ -3,10 +3,11 @@ import { createVanilla } from "./create-vanilla";
33import * as p from "@clack/prompts" ;
44import { cancelable , spinnerify } from "@solid-cli/utils/ui" ;
55import { createStart } from "./create-start" ;
6- import { getTemplatesList , StartTemplate , VanillaTemplate } from "./utils/constants" ;
6+ import { getTemplatesList , GIT_IGNORE , StartTemplate , VanillaTemplate } from "./utils/constants" ;
77import { detectPackageManager } from "@solid-cli/utils/package-manager" ;
88import { insertAtEnd } from "@solid-cli/utils/fs" ;
9- import { existsSync } from "node:fs" ;
9+ import { existsSync , writeFileSync } from "node:fs" ;
10+ import { join } from "node:path" ;
1011export { createVanilla , createStart } ;
1112export const createSolid = ( version : string ) =>
1213 defineCommand ( {
@@ -75,6 +76,8 @@ export const createSolid = (version: string) =>
7576 fn : ( ) => createVanilla ( { template : template as VanillaTemplate , destination : projectName } , transpileToJS ) ,
7677 } ) ;
7778 }
79+ // Add .gitignore
80+ writeFileSync ( join ( projectName , ".gitignore" ) , GIT_IGNORE ) ;
7881 // Add "Created with Solid CLI" text to bottom of README
7982 if ( existsSync ( `${ projectName } /README.md` ) )
8083 await insertAtEnd (
0 commit comments