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

Allow the user to specify a custom script to be run in reload mode #18

Closed
jryannel opened this issue Feb 6, 2017 · 2 comments
Closed
Labels
Projects
Milestone

Comments

@jryannel
Copy link
Collaborator

jryannel commented Feb 6, 2017

When the generator runs in auto reload mode the user should be able to specify a custom script which will be executed after the new interface files are generated.
A practical example is to generate the documentation on every change of the interface files and then auto reload the browser to show the newly generated browsers.

For Qt this would be:

qface-qtcpp --reload interface plugins --script build.sh

the script will be something like this:

export QT_INSTALL_DOCS=~/QtOpen/5.8/Src/qtbase/doc
qdoc plugin.qdocconf

And then a live reloader (using the python live reload package) should watch over the docs/html folder:

livereload docs/html
@jryannel
Copy link
Collaborator Author

jryannel commented Apr 4, 2017

With cli.py docs_serve there is now live reload support for the qface guide.

Reloading for generators is also supported through the watch module. It could be better documented t some point.

There is no support yet to call a script when the generator reloads.

@jryannel jryannel added this to the 2017-08 milestone Apr 4, 2017
@jryannel jryannel added this to Incoming in QFace Apr 4, 2017
@jryannel
Copy link
Collaborator Author

There is now a sh cmd to run a script. You should run it after the normal code-generation run.

from qface.shell import sh

And then use it like (assuming run runs the code generation task)

def app(...):
        run(src, dst)
        sh(cmd)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
QFace
Incoming
Development

No branches or pull requests

1 participant