Repository navigation
Built-in templates: ten ready-made templates inside the binary - #4
Merged
Merged
Conversation
go-basic, go-http, node-basic, node-http, typescript-basic, python-basic, python-http, rust-basic, static-site and blank. foundry new works right after installing, --language falls back to the built-in default of that language, and template export copies one for editing. A CI job builds a project from every template and runs its own tests.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Foundry now ships with ten built-in templates, embedded in the binary, so
foundry newworks right after installing (apt,go installor an archive).go-basic,go-http,node-basic,node-http,typescript-basic,python-basic,python-http,rust-basic,static-site,blank.foundry new my-api --language Gouses the built-in template of that language when no default is set.foundry template listshows built-in and saved templates (--builtin,--saved); a saved template hides a built-in one with the same name.foundry template export <name> <folder>copies a built-in template so it can be changed and saved.foundry config Go go-http).examples/became built-in templates.How it is tested
--dry-runand must have no placeholder without a value; creation, export, defaults, shadowing and the error cases.scripts/test-templates.shcreates a project from every template with the real binary and runs that language's own build and tests (Go, Node, TypeScript, Python, Rust). A new CI job runs it.go.modcannot be embedded (templates keepgo.mod.txt), and the template sources live under_builtin/so the Go tools do not compile them as part of Foundry.