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 a JavaScript API so that the module can be used from other script #42

Closed
MegaJSDeveloper opened this issue Dec 23, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@MegaJSDeveloper
Copy link

MegaJSDeveloper commented Dec 23, 2019

How i can run and force reload electronmon from gulp task?
Electronmon have JS API?

like:

var electronmon = require('electronmon')

var app = electronmon.start('./main.js')
app.reload()
app.close()
app.on('reload', function(){ })
// e.t.c.
@MegaJSDeveloper MegaJSDeveloper changed the title How i can run and forse reload electronmon from gulp task? How i can run and force reload electronmon from gulp task? Dec 23, 2019
@catdad
Copy link
Owner

catdad commented Jan 1, 2020

I must have missed this one, sorry for the delay.

Officially, this module does not have an API, and this is intentional. Can you tell me more about your use case for forcing a reload? Do you mean to do this when gulp detects a file change? I am not sure what the benefit of this is, seeing as gulp should write new source files to disk and electronmon will then detect those changes. Are you meaning to reload the application when non-code files are changed, or when supplementary files used at runtime are changes in a different directory?

@catdad catdad added the question Further information is requested label Jan 1, 2020
@MegaJSDeveloper
Copy link
Author

MegaJSDeveloper commented Jan 1, 2020

@catdad happy new year to you, friend! I generally gave a hint that it would not hurt to make a NodeJS api, this will allow people to write all kinds of plugins on gulp and webpack using your library)

at least there must be three basic things in node api

  1. launch
  2. stoping
  3. event when automatic reload

event must contains info about file, rerload initiator e.t.c. =)

@catdad catdad changed the title How i can run and force reload electronmon from gulp task? add a JavaScript API so that the module can be used from other script Jan 2, 2020
@catdad catdad added enhancement New feature or request and removed question Further information is requested labels Jan 2, 2020
catdad added a commit that referenced this issue Jan 10, 2020
adding a requirable api
@catdad
Copy link
Owner

catdad commented Jan 13, 2020

There is now an API available. If you do find a use for it and find things missing, feel free to file an issue for them.

Published in 1.0.0

@catdad catdad closed this as completed Jan 13, 2020
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