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

Freely configurable suffix for generated .js files #6472

Merged
merged 3 commits into from
Nov 8, 2023

Conversation

cknitt
Copy link
Member

@cknitt cknitt commented Nov 3, 2023

This PR makes the suffix a string field instead of an enum field, allowing for (almost) free configuration of the suffix. There is still a sanity check to prevent weird behavior: The suffix must end with one of .js, .mjs, .cjs and may otherwise contain letters, digits, -, _ and ..

Some examples for allowed suffixes:

  • All the previously allowd ones: .js, .mjs, .cjs, .bs.js, .bs.mjs, .bs.cjs
  • .res.js
  • _res.mjs
  • -rescript.cjs

@cknitt cknitt changed the title WIP: Allow any suffix for generated .js file Freely configurable suffix for generated .js files Nov 4, 2023
@cknitt cknitt marked this pull request as ready for review November 4, 2023 16:30
@cknitt cknitt requested review from cristianoc and zth November 4, 2023 16:30
Copy link
Collaborator

@zth zth left a comment

Choose a reason for hiding this comment

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

Looks great! Just a question.

jscomp/bsb/bsb_package_specs.ml Outdated Show resolved Hide resolved
@cknitt cknitt merged commit 4755d4a into rescript-lang:master Nov 8, 2023
14 checks passed
@cknitt cknitt deleted the any-suffix branch November 18, 2023 07:01
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.

None yet

2 participants