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 #4127

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

Conversation

monyedavid
Copy link
Contributor

@monyedavid monyedavid commented Dec 13, 2024

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

  • example/jslib/module
    • common-config/
    • resources/
    • custom-tasks/
    • override-tasks/
    • compilation-execution-flags/
    • executable-config

@monyedavid monyedavid changed the title add example javascriptlib/module Add first class Javascript/Typescript support to the Mill build tool Dec 13, 2024
@lihaoyi
Copy link
Member

lihaoyi commented Dec 14, 2024

I've taken a glance at this and it isn't really sufficient. Please look at the Java/Kotlin/Scala equivalents of these pages and see what is expected

 - resource handling in TsModule
 - resource handling in bundling
# Conflicts:
#	javascriptlib/src/mill/javascriptlib/TestModule.scala
#	javascriptlib/src/mill/javascriptlib/TypeScriptModule.scala
@monyedavid monyedavid closed this Dec 18, 2024
@monyedavid monyedavid deleted the 3927/jslib-module branch December 18, 2024 05:22
@monyedavid monyedavid reopened this Dec 19, 2024
@monyedavid monyedavid requested a review from lihaoyi December 19, 2024 23:56
@lihaoyi
Copy link
Member

lihaoyi commented Dec 20, 2024

example.javascriptlib.basic[3-custom-build-logic].local.test appears to be failing in CI

@monyedavid
Copy link
Contributor Author

Fixed failing tests

@lihaoyi
Copy link
Member

lihaoyi commented Dec 20, 2024

Some last few comments, otherwise just need to flesh out the documentation for all the build.mill files and include them in a page in docs/modules/ROOT/pages/javascriptlib/linting.adoc

@monyedavid monyedavid requested a review from lihaoyi December 22, 2024 04:14
@lihaoyi
Copy link
Member

lihaoyi commented Dec 23, 2024

I think the code looks good enough for now. Please fix up the docs to include proper english explanations of every example, and ensure that the test-docs CI job passes, then we can merge it

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