This assumes the page is called index.html, you can change it by providing an optional file path or change it globally with the options reloadPage. You can also tell the browser to refresh the entire page. NOTE: Calling this function without providing a path will do nothing. You should provide either a simple string or an object, if an object is given it expects the object to have a path property. livereload.changed(path)Īlternatively, you can call this function to send changes to the livereload server. Also you dont need to worry with multiple instances as this function will end immidiately if the server is already runing. It takes an optional options parameter that is the same as the one noted above. #NPM GULP AND EXPRESS LIVERELOAD FULL#ReloadPage index.html Path to the page the browsers on for a full page reloadĬreates a stream which notifies the livereload server on what changed. These options can either be set through livereload.listen(options) or livereload(options). Livereload = require( 'gulp-livereload') You now have to manually call livereload.listen unless you set the option start: livereload() Gulp-livereload will not automatically listen for changes. #NPM GULP AND EXPRESS LIVERELOAD INSTALL#Install npm install -save-dev gulp-livereload #NPM GULP AND EXPRESS LIVERELOAD SOFTWARE#IN NO EVENT SHALL THE AUTHORS ORĬOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.A lightweight gulp plugin for livereload best used with the livereload chrome extension. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: #NPM GULP AND EXPRESS LIVERELOAD FREE#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to Set the DEBUG environment variables to * to see what's going on $ DEBUG=* gulp If the server is not running then this will be undefined. The instance is a "mini-lr" instance that this wraps around. Gulp-livereload also reveals the underlying server instance for direct access if needed. You can also directly access the middleware of the underlying server instance (mini-lr.middleware) for hookup through express, connect, or some other middleware app rver Also you dont need to worry with multiple instances as this function will end immediately if the server is already runing. ReloadPage index.html Path to the browser's current page for a full page reloadĬreates a stream which notifies the livereload server on what changed. Livereload = require( 'gulp-livereload ')
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |