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

Re-design examples repository for Effect #26

Merged
merged 10 commits into from
Sep 6, 2024
Merged

Re-design examples repository for Effect #26

merged 10 commits into from
Sep 6, 2024

Conversation

IMax153
Copy link
Member

@IMax153 IMax153 commented Sep 3, 2024

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

This PR begins a redesign of the Effect examples repository with the following goals:

  1. Contain the source code and publication infrastructure for a create-effect-app CLI which can be used to quickly setup an example Effect application
  2. Contain a directory of example Effect applications similar to what NextJS does in their own monorepo
  3. The monorepo should be setup to, at the very least, type check both the examples and the CLI package via CI

The CLI

The CLI is currently a scaffold / placeholder as I believe we have some open questions to answer first:

  • Should the CLI be primarily prompt based similar to create-next-app?

My initial thoughts are that the CLI could be runnable like NextJS's, so:

pnpx create-effect-app [project-directory] 

And that the rest of the configuration could be obtained via prompts.

  • Should we also include application templates alongside application examples like NextJS does?

My initial thoughts are that we should focus on examples for now and not include templates.

The Examples

There are also some open questions for the design of the examples:

  • How opinionated should we be with things like the package manager, linting config, etc.?

Related

  • Related Issue #
  • Closes #

Copy link

changeset-bot bot commented Sep 3, 2024

⚠️ No Changeset found

Latest commit: ccd8820

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@tim-smart
Copy link
Member

tim-smart commented Sep 4, 2024

I would love a prompt based cli for scaffolding the following, in order of importance:

  • A opinionated monorepo, because I hate setting up monorepos with all the right tooling
  • A plain repo, with the right tooling
  • A CLI project, with tsup ready to go

The generated monorepo could contain a cli, http server, and domain package OOTB, and you just delete the ones you don't want.

I almost think the templates need to be part of the effect monorepo, so they stay up to date.

@mikearnaldi
Copy link
Member

Re being opinionated we should be very opinionated having projects setup in the best way possible for effect usage. I agree with Tim I hate setting up stuff.

@fubhy
Copy link
Member

fubhy commented Sep 4, 2024

Why do you want to put me out of work

@fubhy
Copy link
Member

fubhy commented Sep 4, 2024

In addition to the project starterkits, I think the scaffolding tool should also be able to spin up projcets from the examples directly.

@IMax153
Copy link
Member Author

IMax153 commented Sep 4, 2024

I almost think the templates need to be part of the effect monorepo, so they stay up to date.

I was actually thinking about this too. To ensure that everything stays up-to-date (and make it a lot easier to do so), it might be worth having both the templates and examples live in the effect monorepo. @mikearnaldi @fubhy - what do you folks think?

Would probably just need to swap out versions when we generate the package.json for a user's project from workspace:^ (which we would probably use locally) to whatever the latest versions are, but that's not difficult.

@fubhy
Copy link
Member

fubhy commented Sep 4, 2024

Oh god, and please also a "minimal-repro" starter.

@mikearnaldi
Copy link
Member

Oh god, and please also a "minimal-repro" starter.

playground? but yes we could

@IMax153
Copy link
Member Author

IMax153 commented Sep 6, 2024

Merging this PR so that we can continue to iterate from here.

@IMax153 IMax153 merged commit 922b4f2 into main Sep 6, 2024
2 checks passed
@IMax153 IMax153 deleted the feat/examples branch September 6, 2024 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants