Skip to content
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
17 changes: 15 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const LANGUAGES: Record<LanguageKey, LanguageInfo> = {
const TEMPLATES: Record<TemplateKey, TemplateInfo> = {
[TEMPLATE_SAMPLE_APP]: {
name: "Sample App",
description: "Extracts page title using Playwright",
description: "Implements basic Kernel apps",
languages: [LANGUAGE_TYPESCRIPT, LANGUAGE_PYTHON],
},
[TEMPLATE_BROWSER_USE]: {
Expand Down Expand Up @@ -292,7 +292,20 @@ function copyTemplateFiles(
throw new Error(`Template not found: ${templatePath}`);
}

fs.copySync(templatePath, appPath);
// Copy all files and handle _gitignore specially
fs.copySync(templatePath, appPath, {
filter: (src, dest) => {
const filename = path.basename(src);
if (filename === '_gitignore') {
console.log("Copying _gitignore");
fs.copyFileSync(src, dest);
// Rename it to .gitignore
fs.renameSync(dest, path.join(path.dirname(dest), '.gitignore'));
return false; // Skip the original copy since we handled it
}
return true; // Copy all other files normally
}
});
}

// Set up project dependencies based on language
Expand Down
81 changes: 81 additions & 0 deletions templates/typescript/sample-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading