Skip to content

Add --reverse command to create templates from folders#29

Merged
datalek merged 3 commits into
mainfrom
feature/reverse-command
Mar 6, 2026
Merged

Add --reverse command to create templates from folders#29
datalek merged 3 commits into
mainfrom
feature/reverse-command

Conversation

@datalek

@datalek datalek commented Mar 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add reverse mode that generates hsfiles templates from existing project folders
  • Add --reverse flag parsing to CLI with new InputArgs union type
  • Update README with documentation for the new feature

Before this change, boil could only generate projects from templates. After this change, users can also create templates from existing projects using the --reverse flag.

Usage

boil --reverse ./my-project ./templates/my-template.hsfiles

datalek added 2 commits March 6, 2026 14:05
Before this commit, boil could only generate projects from templates.
After this commit, users can also create templates from existing
projects using the --reverse flag.

- Add --reverse flag parsing to CLI with new InputArgs union type
- Add createTemplateFromFolder function to recursively read folders
- Extend TemplateEnv with readdir, stat, and relative path methods
- Update main.ts to handle both create and reverse flows
- Add tests for --reverse flag parsing
Before this commit, the README only documented the standard scaffolding
flow. After this commit, users can find documentation for the reverse
mode that creates templates from existing folders.
@changeset-bot

changeset-bot Bot commented Mar 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b17a647

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
boil Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@datalek datalek merged commit 0da729a into main Mar 6, 2026
2 checks passed
@datalek datalek deleted the feature/reverse-command branch March 6, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant