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 first class Javascript/Typescript support to the Mill build tool #4022

Merged
merged 37 commits into from
Dec 10, 2024

Conversation

monyedavid
Copy link
Contributor

@monyedavid monyedavid commented Nov 25, 2024

Related Issues

#3927

Checklist

  • example/jslib/basic
    • 4-multi-modules/: Multiple inter-related Typescript modules
    • 5-client-server-hello/: Demonstrate a client-server application with two modules, one a minimal JS server and one a minimal JS client, wired up and interacting
    • 6-client-server-realistic/: Demonstrate a client-server application with two modules, one an Express server and one a React.js client, wired up and interacting, implementing a TodoMVC application

@monyedavid monyedavid marked this pull request as draft November 25, 2024 01:47
5-client-server-hello/
6-client-server-realistic/
 - use TypeScriptModule
… two modules, one a minimal JS server and one a minimal JS client, wired up and interacting
…ith two modules, one an Express server and one a React.js client, wired up and interacting, implementing a TodoMVC application
	- running
	- bundling of a Node CLI tool
	- type checking
	- testing
- add npmDevDeps
- use npmDeps & npmDevDeps
- rename 1-simple mod qux to foo
- mv jest dependencies into JestModule
- use CreateReactAppModule
 - fix compilation errors from prev merge
@monyedavid monyedavid requested a review from lihaoyi December 7, 2024 02:20
@lihaoyi
Copy link
Member

lihaoyi commented Dec 7, 2024

Seems like the client-server-realistic example still doesn't work???

@lihaoyi
Copy link
Member

lihaoyi commented Dec 7, 2024

Screenshot 2024-12-07 at 4 02 46 PM

def serverMod = server
}

// Documentation for mill.example.javascriptlib
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you got your todomvc example from somewhere on the internet, you should include a link to it

Copy link
Contributor Author

@monyedavid monyedavid Dec 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its the react version of the example defined in scalalib.web

import mill.*
import os.*

trait RsWithExpressModule extends TypeScriptModule {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this? Why can't we just use the normal TypeScriptModule#run that the server module already comes with?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to resources

 - use simple example
 - use tsconfig-paths to resolve ts paths @ run
@monyedavid monyedavid requested a review from lihaoyi December 8, 2024 20:49
 - rm RsWithExpressModule
 - use resources for client build
@lihaoyi
Copy link
Member

lihaoyi commented Dec 9, 2024

@monyedavid looks mostly good, just missing the link to where-ever you got the React.js TodoMVC example then I'll merge it

@lihaoyi lihaoyi merged commit 8c2de86 into com-lihaoyi:main Dec 10, 2024
27 checks passed
@lihaoyi
Copy link
Member

lihaoyi commented Dec 10, 2024

Looks great, thanks @monyedavid . I'll close out the bounty using your existing bank details

@lefou lefou added this to the 0.12.4 milestone Dec 10, 2024
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.

3 participants