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 option to specify local library dirs that are also updated/watched #178

Open
Apollon77 opened this issue Jan 9, 2022 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@Apollon77
Copy link
Collaborator

I'm as a ioBroker adapter developer that also uses self developed libraries (and not have all logic "in the adapter") and use these libraries as dependencies in the adapter would like to have an option to also specify additional directories of these "deps" that are watched and also updated when the dev-server updates anything.

Right now I need stop the dev-server, execute some "cp" commands and then start dev-server again for each change I do on such a library

@tosling
Copy link

tosling commented Jul 9, 2022

The option is actually available. Just add your files/paths to the “files” part of package.json

@Apollon77
Copy link
Collaborator Author

Yes but then they would also be published :-)

@Apollon77
Copy link
Collaborator Author

Apollon77 commented Sep 30, 2022

In fact it is more complex:

  • means that you need an other local dorectory which is monitored and also mapped to a "node_modules" place where files are synced on change
  • nodemon then needs to monitor this additional module directory for changes too for restart

Idea would be "--watchModule "

  • dev-server gets the module name from package.json inside this directory
  • dev-server resolves the module path in the dev-server environment relative to adapter dir
  • setup syncing for src path to the dev-server module-path
  • add dev-server module-path to nodemon

... and somehow different when src is ts ;-)

@Apollon77 Apollon77 added the enhancement New feature or request label Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants