package
Gulp plugin to run a webserver (with LiveReload)
npm install gulp-connectGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Gulp plugin to run a webserver (with LiveReload)
gulp-connect is sponsored by JetBrains!
npm install --save-dev gulp-connectvar gulp = require('gulp'),
connect = require('gulp-connect');
gulp.task('connect', function() {
connect.server();
});
gulp.task('default', ['connect']);var gulp = require('gulp'),
connect = require('gulp-connect');
gulp.task('connect', function() {
connect.server({
root: 'app',
livereload: true
});
});
gulp.task('html', function () {
gulp.src('./app/*.html')
.pipe(gulp.dest('./app'))
.pipe(connect.reload());
});
gulp.
gulp.task('jenkins-tests', function() {
connect.server({
port: 8888
});
// run some headless tests with phantomjs
// when process exits:
connect.serverClose();
});var gulp = require('gulp'),
stylus = require('gulp-stylus'),
connect = require('gulp-connect');
gulp.task('connectDev', function () {
connect.server({
name: 'Dev App',
root: ['app', 'tmp'],
port: 8000,
livereload: true
});
});
gulp.task('connectDist', function () {
connect.server({
name: 'Dist App'
If the http2 package is installed and you use an https connection to gulp connect then http 2 will be used in preference to http 1.
Type: Array or String
Default: Directory with gulpfile
The root path
Type: Number
Default: 8080
The connect webserver port
Type: String
Default: localhost
Type: String
Default: Server
The name that will be output when the server starts/stops.
Type: Object
Default: false
Can be any options documented at https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
When https is just set to true (boolean), then internally some defaults will be used.
Type: Object or Boolean
Default: false
Type: Number
Default: 35729
Overrides the hostname of the script livereload injects in index.html
Type: String
Default: 'undefined'
Type: String
Default: undefined
Fallback file (e.g. index.html)
Type: Function
Default: []
Type: Boolean
Default: false
Type: Boolean or String of a new index pass or Array of new indexes in preferred order
Default: true
gulp.task('connect', function() {
connect.server({
root: "app",
middleware: function(connect, opt) {
return [
// ...
]
}
});
});To contribute to this project, you must have CoffeeScript installed: npm install -g coffee-script.
Then, to build the index.js file, run coffee -o . -bc src/. Run npm test to run the tests.
justinmchase
justin.m.chase@gmail.com
Estimated unpacked size across 46 packages.
1.7 MB
Includes dependencies.
9 direct · 5 outdated
^0.16.2
1.2.1
^3.6.6
3.7.0
^1.1.1
2.0.0
^1.3.2
2.0.0
^0.0.7
0.0.7
^0.6.0
0.6.1