Revert "fix(create-basic-tools): correct template path resolution for npx execution"

This reverts commit 96c53ed49a.
This commit is contained in:
Ajax Davis 2025-12-06 01:48:42 +10:00
parent d10257a8f4
commit 903e1c1948
3 changed files with 2 additions and 12 deletions

View file

@ -1,13 +1,5 @@
# @tpmjs/create-basic-tools
## 1.0.6
### Patch Changes
- fix: correct template path resolution for npx execution
Fixed template path resolution from `../../templates` to `../templates` to work correctly when the package is run via npx. After tsup compilation, the bundle is in `dist/` and only needs to go up one level to reach the package root where templates are located.
## 1.0.0
### Major Changes

View file

@ -1,6 +1,6 @@
{
"name": "@tpmjs/create-basic-tools",
"version": "1.0.6",
"version": "1.0.5",
"description": "CLI generator for scaffolding production-ready TPMJS tool packages",
"type": "module",
"bin": {

View file

@ -27,9 +27,7 @@ export async function copyTemplate(
destPath: string,
replacements?: Record<string, string>
): Promise<void> {
// After tsup compilation, __dirname points to dist/
// Templates are at package root, so we only need to go up one level
const templatePath = path.join(__dirname, '../templates', templateName);
const templatePath = path.join(__dirname, '../../templates', templateName);
let content = await fs.readFile(templatePath, 'utf-8');
// Apply replacements if provided