Gathering detailed insights and metrics for gulp-livereload
Gathering detailed insights and metrics for gulp-livereload
Gathering detailed insights and metrics for gulp-livereload
Gathering detailed insights and metrics for gulp-livereload
npm install gulp-livereload
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
768 Stars
64 Commits
67 Forks
18 Watching
2 Branches
24 Contributors
Updated on 31 Jul 2024
JavaScript (98.33%)
Shell (1.67%)
Cumulative downloads
Total Downloads
Last day
7.2%
7,296
Compared to previous day
Last week
10.1%
40,620
Compared to previous week
Last month
6.4%
165,154
Compared to previous month
Last year
-27.5%
2,153,541
Compared to previous year
A lightweight gulp plugin for livereload to be used with the livereload chrome extension or a livereload middleware.
npm install --save-dev gulp-livereload
gulp-livereload
will not automatically listen for changes. You now have to manually call livereload.listen
unless you set the option start
:
1livereload({ start: true })
1var gulp = require('gulp'), 2 less = require('gulp-less'), 3 livereload = require('gulp-livereload'); 4 5gulp.task('less', function() { 6 gulp.src('less/*.less') 7 .pipe(less()) 8 .pipe(gulp.dest('css')) 9 .pipe(livereload()); 10}); 11 12gulp.task('watch', function() { 13 livereload.listen(); 14 gulp.watch('less/*.less', ['less']); 15});
See examples.
These options can either be set through livereload.listen(options)
or livereload(options)
.
port Server port
host Server host
basePath Path to prepend all given paths
start Automatically start
quiet false Disable console logging
reloadPage index.html Path to the browser's current page for a full page reload
Creates a stream which notifies the livereload server on what changed.
Starts a livereload server. It takes an optional options parameter that is the same as the one noted above. Also you dont need to worry with multiple instances as this function will end immediately if the server is already runing.
Alternatively, you can call this function to send changes to the livereload server. You should provide either a simple string or an object, if an object is given it expects the object to have a path
property.
NOTE: Calling this function without providing a
path
will do nothing.
You can also tell the browser to refresh the entire page. 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 directly access the middleware of the underlying server instance (mini-lr.middleware) for hookup through express, connect, or some other middleware app
gulp-livereload also reveals the underlying server instance for direct access if needed. The instance is a "mini-lr" instance that this wraps around. If the server is not running then this will be undefined
.
Set the DEBUG
environment variables to *
to see what's going on
$ DEBUG=* gulp <task>
The MIT License (MIT)
Copyright (c) 2014 Cyrus David
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 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:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
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. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 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.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 9/29 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More