-
-
Notifications
You must be signed in to change notification settings - Fork 375
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 (4500 Bounty) #3927
Comments
Hi @lihaoyi As a first-time contributor, I will be going over CONTRIBUTING.adoc. Meanwhile, I have a question. For the first task, |
Hi @lihaoyi , |
@ayewo so there are two main components to the first task:
There is existing demo code in https://github.com/com-lihaoyi/mill/blob/main/example/extending/typescript/4-npm-deps-bundle/build.mill that can form the basis of the library code in |
Hi @lihaoyi, |
For @digvijay2003 and anyone else reading, I merged #3970 which sets up the basic scaffolding:
From there you should be able to iterate on the examples necessary for this ticket's bullet points to flesh out the necessary functionality |
Also the example typescript module documentation is mandatory reading for anyone who wants to start on this https://mill-build.org/mill/extending/example-typescript-support.html |
currently working on this |
I an extremely simple It's really really really hacky and will need to find a lot of solutions to some of the problems before this is merge ready, but I hope that it might inspire others. It can be run by making an internal build and using that to run |
@lihaoyi I created a PR for this: #4027 This was asked for exactly, but I think this would be a good direction to head for the JS support. I also don't think it will deride @monyedavid's efforts too much as the changes aren't very incompatible. The new |
I think there might be sufficient examples for me to build upon to do |
Anyone working on this, I'd be curious to hear your thoughts on sharing |
…4003) ### Related Issues #3927 ### Checklist - [x] **example/jslib/basic** - [x] 1-simple/: A minimal Typescript module demonstrating typechecking/running/testing/bundling of a Node CLI tool - [x] 2-react/: A minimal Typescript module demonstrating typechecking/running/testing/bundling of a React-based web application, served using a static HTML page - [x] 3-custom-build-logic/: A Typescript module with custom build logic
…4022) ### Related Issues #3927 ### Checklist - [x] **example/jslib/basic** - [x] 4-multi-modules/: Multiple inter-related Typescript modules - [x] 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 - [x] 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
…4127) This pr implements the examples for jslib/module. #3927 Key Changes: - handle usage of resources files in bundled and non-bundled environments - handle custom-resources usage - Standard resource files in `@<module-name>/resources` or custom resources files in user defined custom resource path can be imported globally`@<module-name>/resources-directory` - allows for access to resources defined in dependent modules - allows for access to resources in bundled code and environment - allows for access to resources define in `/test` - updated build script to handle multiple resources directories Implements Task generatedSources - imported via `@generated/generated-file-name` Note: For `example/javascriptlib/module/3-override-tasks/`, the foo directory needs to exist, hence the file `foo/readme.md`, code sources are generated from its .mill file ### Checklist - [x] **example/jslib/module** - [x] common-config/ - [x] resources/ - [x] custom-tasks/ - [x] override-tasks/ - [x] compilation-execution-flags/ - [x] executable-config
|
There are 3 tasks left and the 2nd one has an open PR already (#4250) which leaves 1 and 3.
|
example/jslib/linting & example/jslib/publishing/1-publish-module, currently wip |
According to the bounty rules, you can't hoard bounties:
So please clearly state which task you are currently working on right now, so others can focus their efforts on the tasks that are left. |
Both are in progress, testing stage, the first to be put out will be linting. |
…om-lihaoyi#4003) ### Related Issues com-lihaoyi#3927 ### Checklist - [x] **example/jslib/basic** - [x] 1-simple/: A minimal Typescript module demonstrating typechecking/running/testing/bundling of a Node CLI tool - [x] 2-react/: A minimal Typescript module demonstrating typechecking/running/testing/bundling of a React-based web application, served using a static HTML page - [x] 3-custom-build-logic/: A Typescript module with custom build logic
…om-lihaoyi#4022) ### Related Issues com-lihaoyi#3927 ### Checklist - [x] **example/jslib/basic** - [x] 4-multi-modules/: Multiple inter-related Typescript modules - [x] 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 - [x] 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
…4293) This pr implements the examples for jslib/dependencies. #3927 Checklist: - [x] **example/jslib/publish** - [x] 1-publish - [x] 2-realistic Key changes: - Packages can now be imported without the node_modules prefix. - PublishMeta - package.json (for publish) generation - Prepare js code for publishing in publish directory
…om-lihaoyi#4293) This pr implements the examples for jslib/dependencies. com-lihaoyi#3927 Checklist: - [x] **example/jslib/publish** - [x] 1-publish - [x] 2-realistic Key changes: - Packages can now be imported without the node_modules prefix. - PublishMeta - package.json (for publish) generation - Prepare js code for publishing in publish directory
…4398) This pr implements the examples for jslib/dependencies. #3927 Checklist: - [x] **example/jslib/linting** - [x] 1-linting - [x] 2-autoformatting - [x] 3-code-coverage Key changes: - Add coverage for Jest, Jasmine, Mocha and Vitest. - Add lint and auto format support with prettier and eslint. - Generate test config for Jest & Vite, with option to use a custom test config. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Li Haoyi <haoyi.sg@gmail.com>
This ticket is now complete. Thanks @monyedavid for working through all the various examples and fleshing out the |
…om-lihaoyi#4398) This pr implements the examples for jslib/dependencies. com-lihaoyi#3927 Checklist: - [x] **example/jslib/linting** - [x] 1-linting - [x] 2-autoformatting - [x] 3-code-coverage Key changes: - Add coverage for Jest, Jasmine, Mocha and Vitest. - Add lint and auto format support with prettier and eslint. - Generate test config for Jest & Vite, with option to use a custom test config. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Li Haoyi <haoyi.sg@gmail.com>
From the maintainer Li Haoyi: I'm putting a 4500USD bounty on this issue, payable by bank transfer on merged PRs implementing this. Standard bounty terms apply
Mill is a multi-language build tool that provides automatic caching and parallelism of build tasks related to local development (see What Makes Mill Unique?). Traditionally it targeted JVM languages, but we think that JS/TS projects could benefit from automatic caching and parallelism as well, especially the larger multi-language codebases with both JVM and JS/TS modules that would benefit from having a single build tool able to build code in both languages incrementally and in parallel.
The goal of this ticket is to generate a set of Typescript build examples that match the Java/Scala/Kotlin equivalents. We already have an example TypescriptModule for demo purposes, but we would need to flesh it out using the equivalent Typescript tools and libraries.
For the purposes of this ticket, each examples should match as closely as possible the Java/Scala/Kotlin equivalents, to provide a useful minimal-but-still-educational code example, along with associated english documentation and explanations. You should read through the relevant sections of the Building Java with Mill documentation before proceeding, even if you don't know Java, just to get a feel for what the documentation and examples for each section should cover.
example/jslib/basic/
(500USD)1-simple/
: A minimal Typescript module demonstrating typechecking/running/testing/bundling of a Node CLI tool2-react/
: A minimal Typescript module demonstrating typechecking/running/testing/bundling of a React-based web application, served using a static HTML page3-custom-build-logic/
: A Typescript module with custom build logicexample/jslib/basic/
: (500USD)4-multi-modules/
: Multiple inter-related Typescript modules5-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 interacting6-client-server-realistic/
: Demonstrate a client-server application with two modules, one an Express server and one an React.js client, wired up and interacting, implementing a TodoMVC applicationexample/jslib/dependencies/
(500USD)1-npm-deps/
2-unmanaged-packages/
3-downloading-unmanaged-packages/
4-repository-config/
: examples of how to use alternate NPM mirrors or repositoriesexample/jslib/linting/
(1000USD)1-autoformatting/
: equivalent to1-scalafmt
but using some Typescript autoformatter2-code-coverage/
: not sure what the popular Typescript code coverage lib is, but they should have something3-linting/
: using some popular Typescript linterexample/jslib/module/
(500USD)1-common-config/
2-custom-tasks/
3-override-tasks/
4-compilation-execution-flags/
5-resources/
6-executable-config/
example/jslib/testing/
(500USD)1-test-suite/
: we should demonstrate usage of at least 2 Javascript testing frameworksmocha
andjest
2-test-deps/
example/jslib/testing/
(500USD)3-integration-suite/
: we should demonstrate usage of at least 2 Javascript integration testing frameworkscypress
andplaywright
example/jslib/publishing/1-publish-module/
,example/jslib/basic/2-realistic/
(500USD)publishing/1-publish-module/
should demonstrate how to publish a Typescript module to NPMThe text was updated successfully, but these errors were encountered: