Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a monorepo template? #122

Open
natemoo-re opened this issue May 30, 2019 · 7 comments
Open

Add a monorepo template? #122

natemoo-re opened this issue May 30, 2019 · 7 comments
Labels
kind: feature New feature or request scope: templates Related to an init template, not necessarily to core (but could influence core) topic: monorepo Related to Lerna monorepos

Comments

@natemoo-re
Copy link
Contributor

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.

  1. Add these options directly to the create template prompt and add CLI flags for each.

  2. 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.

@jaredpalmer
Copy link
Owner

Update: I just moved formik into a monorepo powered by tsdx (with both React native and react packages). Should be a good test bed. We DEF want to bake this in because it was huge pain to setup with VSCode.

@swyxio
Copy link
Collaborator

swyxio commented Dec 11, 2019

what were the VSCode specific pain points?

@thaiphan
Copy link

@jaredpalmer Is that something you can blog about?

@mwarger
Copy link

mwarger commented Mar 3, 2020

@jaredpalmer - any updates on the baked-in monorepo setup? Interested to see what you encountered... Thanks.

@agilgur5 agilgur5 added the topic: monorepo Related to Lerna monorepos label Mar 20, 2020
@agilgur5 agilgur5 added kind: feature New feature or request scope: integration Related to an integration, not necessarily to core (but could influence core) labels Apr 26, 2020
@pcowgill
Copy link

pcowgill commented Jun 9, 2020

Update: I just moved formik into a monorepo powered by tsdx (with both React native and react packages). Should be a good test bed. We DEF want to bake this in because it was huge pain to setup with VSCode.

In the meantime, we can look at the formik repo as a reference https://github.com/formik/formik

@kylemh
Copy link
Contributor

kylemh commented Jul 20, 2020

Looks like #778 should cover it and I'm also using TSDX in a lerna monorepo with yarn workspaces here.

@agilgur5
Copy link
Collaborator

@kylemh since #778 doesn't actually add the full workflow with tsdx create and replacing naming etc, I wouldn't say this is resolved until then. #778 probably resolves the lesser #275 however.

@agilgur5 agilgur5 changed the title Add monorepo template Add a monorepo template? Aug 27, 2020
@agilgur5 agilgur5 added scope: templates Related to an init template, not necessarily to core (but could influence core) and removed scope: integration Related to an integration, not necessarily to core (but could influence core) labels Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: feature New feature or request scope: templates Related to an init template, not necessarily to core (but could influence core) topic: monorepo Related to Lerna monorepos
Projects
None yet
Development

No branches or pull requests

8 participants