diff --git a/src/index.ts b/src/index.ts index da5484f..6ebc0c8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -144,7 +144,13 @@ async function createServer(directory: string, options: any = {}) { if (!stats.isFile()) continue; - const targetPath = path.join(directory, file.replace(".ejs", "")); + // Special handling for dot files - remove the leading dot from template name + const targetPath = path.join( + directory, + file.startsWith('dotfile-') + ? `.${file.slice(8).replace('.ejs', '')}` + : file.replace('.ejs', '') + ); const targetDir = path.dirname(targetPath); // Create subdirectories if needed diff --git a/template/.gitignore b/template/dotfile-gitignore similarity index 81% rename from template/.gitignore rename to template/dotfile-gitignore index f3b83e6..7f106e9 100644 --- a/template/.gitignore +++ b/template/dotfile-gitignore @@ -1,4 +1,4 @@ node_modules/ build/ *.log -.env* +.env* \ No newline at end of file