Skip to content

The npm watch task is not notified about file changes #157

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

Closed
bendera opened this issue Nov 3, 2022 · 3 comments · Fixed by #164
Closed

The npm watch task is not notified about file changes #157

bendera opened this issue Nov 3, 2022 · 3 comments · Fixed by #164

Comments

@bendera
Copy link
Contributor

bendera commented Nov 3, 2022

I'd like to contribute to the project, but I couldn't figure out how to use the local development environment. When I run the yarn dev or yarn watch command, the modified files are not compiled automatically. Did I miss something? I tried to remove the "files": [], entry from tsconfig but in this case, the compiler complains about the definition files. I'm not skilled enough to fix this issue.

@bennypowers
Copy link
Member

might be worth moving to wireit after google/wireit#33 lands

@bendera
Copy link
Contributor Author

bendera commented Nov 18, 2022

Okay, I got it.

I forgot to mention the most important thing, I work on Windows.

I changed the tsc-watch command to tsc --build --watch in the watch task and it works perfectly.
https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript

Other issues I have faced:

The web dev server refuses the connection when I start it with the dev task. I changed the script to:
"dev": "concurrently \"npm run watch\" \"npm run serve\" --names=\"tsc,server\""

I had to replace single quotes to escaped double quotes in the analyze task of the fixtures/lit package:
"analyze": "cem analyze --litelement --globs \"src/*.ts\""

I'm happy to open a PR for this if you need it.

@web-padawan
Copy link
Collaborator

Thanks for the issue. Sorry for not answering, I was busy with other things lately. Will update the npm scripts soon.

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 a pull request may close this issue.

3 participants