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

Update watcher rules #6420

Merged
merged 4 commits into from
Oct 10, 2023
Merged

Conversation

DZakh
Copy link
Contributor

@DZakh DZakh commented Sep 30, 2023

  1. Recompile only on relevant file changes. Fixes the problem of recompiling on .ts/.css file changes in mixed codebases.
  2. Remove gentypeconfig retrieval logic overhead, making all scripts a little bit faster.

@DZakh
Copy link
Contributor Author

DZakh commented Sep 30, 2023

Ready for review

rescript Outdated Show resolved Hide resolved
rescript Outdated
@@ -239,6 +221,14 @@ if (maybeSubcommand === "build" && process_argv.includes("-w")) {
let webSocketHost = "localhost";
let webSocketPort = 9999;

let resConfig = "rescript.json";
let resConfigFile = path.join(cwd, resConfig);
if (!fs.existsSync(resConfigFile)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've moved the piece so it doesn't run for other non-watch commands.

@cknitt cknitt merged commit 79cea54 into rescript-lang:master Oct 10, 2023
14 checks passed
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