Skip to content

Commit

Permalink
Merge pull request #8 from modelcontextprotocol/justin/fix-gitignore
Browse files Browse the repository at this point in the history
Rename .gitignore to avoid xplat problems
  • Loading branch information
jspahrsummers authored Nov 25, 2024
2 parents e3c690c + c301f34 commit 078a3c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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*

0 comments on commit 078a3c9

Please sign in to comment.