One template, different editions
The basic edition does not need analytics; the team edition does. Everything else is the same. With a separate template for each, every shared bug needs fixing twice.
Keep the complete source, including analytics, and add a config that removes it for the basic edition. Below, basic.json removes the analytics file and its references in the entry point. team.json keeps them.
Example note
starter/src/main.ts
import { track } from './analytics'
track('app-started')
console.log('Hello')
Create command
pnpm create preset init my-basic-app --from ./presets/basic.jsonTemplate differences
Both configs take files from starter. The basic edition adds two steps:
excludeleaves outsrc/analytics.ts.replaceremoves the import and call fromsrc/main.ts, so the entry point no longer refers to the deleted file.
The team edition keeps both files. In each edition, the generated package.json name matches the target directory: my-basic-app or my-team-app.
Shared fixes go into the source repository once. New projects use the selected preset when created; projects already generated need updating separately.
Text replacement rules
replace matches exact text. After editing the entry point, check the config's from value too. Creation fails if that text can no longer be found.
This works for small, explicit file differences. Any references that need removing must be listed in the config. The CLI does not analyze module references or convert TypeScript automatically.
See Preset Configs for more operations.