Currently diecut extract assumes the entire source directory is the project and outputs a complete standalone template. Two enhancements would make it more flexible:
1. Extract a subdirectory — point at a subset of a project rather than the whole thing (e.g., diecut extract ./monorepo/packages/auth --var ...). This is mostly straightforward since the scanner already works on a root path.
2. Merge into an existing template — add extracted files into an already-defined template's template/ directory and append variables to its diecut.toml. This is harder: needs merging of variables, conflict detection for computed expressions, and appending to exclude/conditional lists without duplicates.
Currently
diecut extractassumes the entire source directory is the project and outputs a complete standalone template. Two enhancements would make it more flexible:1. Extract a subdirectory — point at a subset of a project rather than the whole thing (e.g.,
diecut extract ./monorepo/packages/auth --var ...). This is mostly straightforward since the scanner already works on a root path.2. Merge into an existing template — add extracted files into an already-defined template's
template/directory and append variables to itsdiecut.toml. This is harder: needs merging of variables, conflict detection for computed expressions, and appending to exclude/conditional lists without duplicates.