feat: add new default template#10
Open
TomChv wants to merge 1 commit into
Open
Conversation
TomChv
force-pushed
the
feat/improve-typescript-template
branch
3 times, most recently
from
July 17, 2026 10:22
9832266 to
e9fc332
Compare
Replace the empty init template with a small working module (a Workspace-based class exposing a container function) and rename the old empty template to "empty". Generalize template rendering so both go through render + config, and add an e2e check covering them. Design doc under design/. Signed-off-by: Tom Chauveau <tom@dagger.io>
TomChv
force-pushed
the
feat/improve-typescript-template
branch
from
July 17, 2026 14:43
e9fc332 to
c927636
Compare
TomChv
marked this pull request as ready for review
July 17, 2026 14:43
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
Replaces the empty default
dagger module init typescripttemplate with a small, useful module, and keeps the previous empty template available via--template empty.The new default is a
Workspace-based@objectclass that:workspace.directory("/", { exclude: [...] }),baseImageAddressfield, andcontainer()function that mounts the source, ready to build on.It is intentionally minimal — a starting point that removes boilerplate, not a tutorial full of functions to delete. Testing/linting is left to
dagger setup.Changes
templates/default/src/index.ts.tmpl.templates/minimal→templates/empty(reachable via--template empty).initModulenow defaults totemplate = "default", andrenderedTemplateis generalized so every built-in template goes through render + config-updator (the empty template ships nopackage.json, so it needs the same pipeline).e-2-e:template-checkintegration check covering both templates.design/.Testing
template-check.dagger module init typescriptproduces a module that loads and introspects (base-image-address,container).