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

Prepare JS Modules to be more extendable #4027

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

myyk
Copy link
Contributor

@myyk myyk commented Nov 25, 2024

This is a very opinionated change which is inspired by my experiment with running NextJS on Mill in https://github.com/myyk/mill/tree/example-nextjs. It would be a smaller diff to merge that build off of this.

This change adds these features:

  • rename TypeScriptModule to TscModule since there will be many types of TypeScript projects that wouldn't even want to extend it.
  • Split out the node package managing stuff into NodeModule. In the future, this might even want to have flavors of NpmModule/YarnModule/etc but I don't want to over engineer this.
  • install is a new command which can be more agnostic to npm or yarn or whatever and will install deps and copy
    node_modules/ to the user's project outside of the cache to help the IDE. This will make auto-complete work a lot of the time.
  • Splits out dev and normal dependencies like would be done in a node project.
  • Ignores node_modules/ in mill repo
  • Adds ignoring node_modules/ in examples, assuming user can copy example into their repo as a template.

Future work after this:

@lihaoyi
Copy link
Member

lihaoyi commented Nov 26, 2024

Let's merge #4003 before we proceed with this one, since that one has been WIP for a while and seems almost done

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.

2 participants