Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Rename .gitignore to avoid xplat problems #8

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion template/.gitignore → template/dotfile-gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules/
build/
*.log
.env*
.env*