-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: adopt create engine's 'new' mode (#1766)
## PR Checklist - [x] Addresses an existing open issue: fixes #1754; fixes #1763 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Corresponding `create` PR: JoshuaKGoldberg/create#48 Adds `src/` directory creation as part of Block `initialize()`s. Hooks up `mode: "new"` for the new runtime mode setting. As a result, `createStructure` no longer needs a manual `src: createSrc()`. I've been testing this with: ```shell gh repo delete JoshuaKGoldberg/cta-create-testing-1 --yes; rm -rf ./cta-*; CTA_CREATE_ENGINE=true node ~/repos/create-typescript-app/bin/index.js --base common --owner JoshuaKGoldberg --repository cta-create-testing-1 --title "CTA Create Testing" --description "Testing, will delete."; code cta-create-testing-1 ``` 💖
- Loading branch information
1 parent
fd67f75
commit 14b6e51
Showing
23 changed files
with
292 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { z } from "zod"; | ||
|
||
import { base } from "../base.js"; | ||
|
||
export const blockExampleFiles = base.createBlock({ | ||
about: { | ||
name: "Example Files", | ||
}, | ||
addons: { | ||
files: z.record(z.string()).default({}), | ||
}, | ||
initialize({ addons }) { | ||
return { | ||
files: { | ||
src: addons.files, | ||
}, | ||
}; | ||
}, | ||
// TODO: Make produce() optional (so base is generic on its definition) | ||
produce() { | ||
return {}; | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.