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

Start node generator without watcher #55

Closed
Dzeri96 opened this issue Jun 24, 2021 · 4 comments · Fixed by #56
Closed

Start node generator without watcher #55

Dzeri96 opened this issue Jun 24, 2021 · 4 comments · Fixed by #56

Comments

@Dzeri96
Copy link

Dzeri96 commented Jun 24, 2021

Hi,
When testing my app, I'd like to generate the Translation class in order to check type safety with tsc. A script in package.json would look something like this:

"scripts": {
    "test": "typesafe-i18n && tsc && npm run testOnly",
    ...

But the problem is that the watcher keeps running and the script never continues executing. Would it be possible to have a one-shot mode of the typesafe-i18n command? I'd contribute if you don't have time.

@ivanhofer
Copy link
Owner

Hi @Dzeri96,
I also need to implement this functionality for an upcoming feature. Just give me a few days :)

@ivanhofer
Copy link
Owner

You can checkout the new --no-watch option in version 2.28.0

@Dzeri96
Copy link
Author

Dzeri96 commented Jun 28, 2021

Thanks for the fast implementation! One suggestion I'd also make is to remove the chokidar dependency when running in one-shot mode. As far as I'm aware it's not needed in that case.

@ivanhofer
Copy link
Owner

It's not needed to run but I would need to create an own bundle for the --no-watch option.
And I think this would not work with the bin attribute inside package.json.

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.

2 participants