Current Behavior
Currently, users can scaffold out a monorepo manually, then add tsdx as a dependency at the root of the project.
Desired Behavior
Users should be able to scaffold out a monorepo project using npx tsdx create. Just like the current templates, users could pass a flag or select from the interactive prompt.
Suggested Solution
Create two new templates, monorepo-basic and monorepo-react. In both cases, the only additional dependency would be lerna. The root package.json scripts would use lerna run command and any packages would use tsdx command.
-
Add these options directly to the create template prompt and add CLI flags for each.
-
Add an additional prompt to the create command which allows you to select a project structure (basic or monorepo?) and add a —monorepo CLI flag which will automatically resolve the monorepo templates.
Who does this impact? Who is this for?
This feature would be very beneficial for anyone managing a larger project who wishes to leverage both tsdx and lerna.
Describe alternatives you've considered
If this use case seems out of scope, improving the documentation around integrating with lerna would be helpful to guide users through manual setup.
As a possible alternative, tsdx could become monorepo-aware so that running npx tsdx create mylib from within a monorepo could scaffold out a new package in the packages/ (or configured in lerna.json) directory.
Additional context
I have created a minimal tsdx-monorepo example project.
I would be happy to contribute to this feature, but I want to collect feedback and hash out the preferred approach before starting.
Current Behavior
Currently, users can scaffold out a monorepo manually, then add
tsdxas a dependency at the root of the project.Desired Behavior
Users should be able to scaffold out a monorepo project using
npx tsdx create. Just like the current templates, users could pass a flag or select from the interactive prompt.Suggested Solution
Create two new templates,
monorepo-basicandmonorepo-react. In both cases, the only additional dependency would belerna. The rootpackage.jsonscripts would uselerna run commandand any packages would usetsdx command.Add these options directly to the
createtemplate prompt and add CLI flags for each.Add an additional prompt to the
createcommand which allows you to select a project structure (basicormonorepo?) and add a—monorepoCLI flag which will automatically resolve the monorepo templates.Who does this impact? Who is this for?
This feature would be very beneficial for anyone managing a larger project who wishes to leverage both
tsdxandlerna.Describe alternatives you've considered
If this use case seems out of scope, improving the documentation around integrating with
lernawould be helpful to guide users through manual setup.As a possible alternative,
tsdxcould become monorepo-aware so that runningnpx tsdx create mylibfrom within a monorepo could scaffold out a new package in thepackages/(or configured inlerna.json) directory.Additional context
I have created a minimal tsdx-monorepo example project.
I would be happy to contribute to this feature, but I want to collect feedback and hash out the preferred approach before starting.