You can delay a certain seconds to send the reload signal: # delay 2 seconds for reloading You can also use other library (for example: formic) for more powerful file adding: for filepath in formic.FileSet(include="**.css"): Server.watch can watch a filepath, a directory and a glob pattern: server.watch('path/to/file.txt') watcher: a watcher instance, you don't have to create one.watch( 'style.less', shell( 'lessc style.less', output = 'style.css')) It can power a wsgi application now:įrom livereload import Server, shell server = Server( wsgi_app) The new livereload server is designed for developers. Instead of a Guardfile you can now write a Python script using very similar syntax and run it instead of the command line application. This conflicted with other tools that used the same file for their configuration and is no longer supported since python-livereload 2.0.0. Older versions of python-livereload used a Guardfile to describe optional additional rules for files to watch and build commands to run on changes. w WAIT, -wait WAIT Time delay before reloading p PORT, -port PORT Port to run `livereload` server on h, -help show this help message and exit Python-livereload provides a command line utility, livereload, for starting a server in a directory.īy default, it will listen to port 35729, the common port for LiveReload browser extensions. Python-livereload is for web developers who know Python, and is available on PyPI. Reload webpages on changes, without hitting refresh in your browser.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |