{"_id":"@achingbrain/gulp-connect","_rev":"1-b1e76b1516f4646acaf68dab58f1e21d","name":"@achingbrain/gulp-connect","dist-tags":{"latest":"5.6.1"},"versions":{"5.6.1":{"name":"@achingbrain/gulp-connect","version":"5.6.1","description":"Gulp plugin to run a webserver (with LiveReload) and https://github.com/AveVlad/gulp-connect/pull/261 applied","license":"MIT","repository":{"type":"git","url":"git://github.com/avevlad/gulp-connect.git"},"authors":[{"name":"Vladislav Derjavin","email":"dev@vld.me","url":"http://vld.me/"},{"name":"Johannes Schickling","email":"schickling.j@gmail.com","url":"http://schickling.me/"},{"name":"Justin Chase","email":"justin.m.chase@gmail.com","url":"http://justinmchase.com"},{"name":"Contributors","homepage":"https://github.com/AveVlad/gulp-connect/graphs/contributors"}],"scripts":{"test":"mocha","pretest":"coffee -o . -bc src/","prepublish":"coffee -o . -bc src/"},"engines":{"node":">=0.10.0"},"keywords":["gulpfriendly","connect","livereload","webserver","server"],"dependencies":{"ansi-colors":"^2.0.5","connect":"^3.6.6","connect-livereload":"^0.6.0","map-stream":"^0.0.7","fancy-log":"^1.3.2","send":"^0.16.2","serve-index":"^1.9.1","serve-static":"^1.13.2","tiny-lr":"^1.1.1"},"devDependencies":{"coffee-script":"^1.12.7","gulp":"^4.0.0","gulp-stylus":"^2.7.0","mocha":"^5.2.0","supertest":"^3.1.0"},"gitHead":"dfccb7e9056b4091d0e518ca679d58667989f1aa","bugs":{"url":"https://github.com/avevlad/gulp-connect/issues"},"homepage":"https://github.com/avevlad/gulp-connect#readme","_id":"@achingbrain/gulp-connect@5.6.1","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"dist":{"integrity":"sha512-r5LFNdLcGaARvel7DB1QDwEBfHJwD34tqt0jIEa1ssnfym8RMpxES+Me1hqSygTVqEhW6Fh13Grb81McyAPaBA==","shasum":"902faeb46703cae44e8190ec76d326491bc0a1a9","tarball":"https://registry.npmjs.org/@achingbrain/gulp-connect/-/gulp-connect-5.6.1.tgz","fileCount":15,"unpackedSize":198925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCRL6CRA9TVsSAnZWagAAco0P/1jc/QwLQ6uSn66K2vcE\nfY+ubXV4DOClqbUFlo9MUm9sMAF1VDzZ4Cb6LaqI6FmQkgOJR4LGd+1YBpCj\n1lrGCKCNtsrv0kEEsYLn44Je+D6Z7Q/bFYD/ipNWUT+P2UPe9sd6J+WC9zEG\n3UBfIsxL9TQd9GupsBMrdEwNLXE/PGg5+FR18OXfocdJidahB7wdxRPMBcyv\nbVvr6lO0vqlrawK1+myi1SGgS+Ncmff5iLCU6uhHhHqEo9ndpQjUXrsq+bLj\nxmVvHQdSQ7nyVMNMEIlc9VdqYRYiSD0JRRBUXGfiBlUtElPTD82v1TKkTpt6\nkaOnUVhtJ2e/I33X10QEee6I0QLjAsgwlcZZzrQxKvcHfyDLkSk0o31yohTi\n+e+sLYHRlajmY6Dl1gFMYztgeIHIFURqgIxZsLWYsqHBJmkr0ggPevtqkOwQ\ngXApQPxPAGGa0NMDuO0+UufK6SFMmbji63x1TZP6p3gfVpg65glJ3rOBggne\nMe0sPdKIXPa9bHjUXI4mQ8vdF6oRAIysNviRwqOYBQ7ugXF+3nvz2NwY0Zgn\nEbUV1QnKBhuXNK+Xh1XocDds7wReADqo+d3RTHh+i2WyhIWIXDPrUoYu/Q/i\nP5yMXXJZrcieI4dLB/n205PKAPfB0NumdUQ09W09PZujL3V3ino6lMgyHAvP\n4N5Z\r\n=jetJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEuxN4DdhWAHRVsC+/AN0n8h0IqHONUDWX4AlvCkyXvNAiEAp0uc00ZvQBldWIRFOGol4qfvlDvkCc01TP0FdqrawtU="}]},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gulp-connect_5.6.1_1544098553375_0.910965414380329"},"_hasShrinkwrap":false}},"time":{"created":"2018-12-06T12:15:53.181Z","5.6.1":"2018-12-06T12:15:53.561Z","modified":"2022-04-04T11:10:59.023Z"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"description":"Gulp plugin to run a webserver (with LiveReload) and https://github.com/AveVlad/gulp-connect/pull/261 applied","homepage":"https://github.com/avevlad/gulp-connect#readme","keywords":["gulpfriendly","connect","livereload","webserver","server"],"repository":{"type":"git","url":"git://github.com/avevlad/gulp-connect.git"},"bugs":{"url":"https://github.com/avevlad/gulp-connect/issues"},"license":"MIT","readme":"gulp-connect [![Build Status](http://img.shields.io/travis/AveVlad/gulp-connect.svg?style=flat-square)](https://travis-ci.org/AveVlad/gulp-connect) [![](http://img.shields.io/npm/dm/gulp-connect.svg?style=flat-square)](https://www.npmjs.org/package/gulp-connect) [![](http://img.shields.io/npm/v/gulp-connect.svg?style=flat-square)](https://www.npmjs.org/package/gulp-connect) [![Join the chat at https://gitter.im/AveVlad/gulp-connect](https://badges.gitter.im/AveVlad/gulp-connect.svg)](https://gitter.im/AveVlad/gulp-connect?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n==============\n\n> Gulp plugin to run a webserver (with LiveReload)\n\n## Sponsors\n\ngulp-connect is sponsored by [JetBrains](https://www.jetbrains.com/)!\n\n<a href=\"https://www.jetbrains.com/\" taget=\"_blank\"><img src=\"jetbrains.png\" height=\"150\" width=\"150\"></a>\n\n\n## Install\n\n```\nnpm install --save-dev gulp-connect\n```\n\n## Usage\n\n```js\nvar gulp = require('gulp'),\n  connect = require('gulp-connect');\n\ngulp.task('connect', function() {\n  connect.server();\n});\n\ngulp.task('default', ['connect']);\n```\n\n#### LiveReload\n```js\nvar gulp = require('gulp'),\n  connect = require('gulp-connect');\n\ngulp.task('connect', function() {\n  connect.server({\n    root: 'app',\n    livereload: true\n  });\n});\n\ngulp.task('html', function () {\n  gulp.src('./app/*.html')\n    .pipe(gulp.dest('./app'))\n    .pipe(connect.reload());\n});\n\ngulp.task('watch', function () {\n  gulp.watch(['./app/*.html'], ['html']);\n});\n\ngulp.task('default', ['connect', 'watch']);\n```\n\n\n#### Start and stop server\n\n```js\ngulp.task('jenkins-tests', function() {\n  connect.server({\n    port: 8888\n  });\n  // run some headless tests with phantomjs\n  // when process exits:\n  connect.serverClose();\n});\n```\n\n\n#### Multiple server\n\n```js\nvar gulp = require('gulp'),\n  stylus = require('gulp-stylus'),\n  connect = require('gulp-connect');\n\ngulp.task('connectDev', function () {\n  connect.server({\n    name: 'Dev App',\n    root: ['app', 'tmp'],\n    port: 8000,\n    livereload: true\n  });\n});\n\ngulp.task('connectDist', function () {\n  connect.server({\n    name: 'Dist App',\n    root: 'dist',\n    port: 8001,\n    livereload: true\n  });\n});\n\ngulp.task('html', function () {\n  gulp.src('./app/*.html')\n    .pipe(gulp.dest('./app'))\n    .pipe(connect.reload());\n});\n\ngulp.task('stylus', function () {\n  gulp.src('./app/stylus/*.styl')\n    .pipe(stylus())\n    .pipe(gulp.dest('./app/css'))\n    .pipe(connect.reload());\n});\n\ngulp.task('watch', function () {\n  gulp.watch(['./app/*.html'], ['html']);\n  gulp.watch(['./app/stylus/*.styl'], ['stylus']);\n});\n\ngulp.task('default', ['connectDist', 'connectDev', 'watch']);\n```\n\n#### http2 support\n\nIf the [http2](https://www.npmjs.com/package/http2) package is installed and you use an https connection to gulp connect then http 2 will be used in preference to http 1.\n\n## API\n\n#### options.root\n\nType: `Array or String`\nDefault: `Directory with gulpfile`\n\nThe root path\n\n#### options.port\n\nType: `Number`\nDefault: `8080`\n\nThe connect webserver port\n\n#### options.host\n\nType: `String`\nDefault: `localhost`\n\n#### options.name\n\nType: `String`\nDefault: `Server`\n\nThe name that will be output when the server starts/stops.\n\n#### options.https\n\nType: `Object`\nDefault: `false`\n\nCan be any options documented at https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener\n\nWhen https is just set to `true` (boolean), then internally some defaults will be used.\n\n#### options.livereload\n\nType: `Object or Boolean`\nDefault: `false`\n\n#### options.livereload.port\n\nType: `Number`\nDefault: `35729`\n\nOverrides the hostname of the script livereload injects in index.html\n\n#### options.livereload.hostname\n\nType: `String`\nDefault: 'undefined'\n\n#### options.fallback\n\nType: `String`\nDefault: `undefined`\n\nFallback file (e.g. `index.html`)\n\n#### options.middleware\n\nType: `Function`\nDefault: `[]`\n\n#### options.debug\n\nType: `Boolean`\nDefault: `false`\n\n#### options.index\n\nType: `Boolean or String of a new index pass or Array of new indexes in preferred order`\nDefault: `true`\n\n```js\ngulp.task('connect', function() {\n  connect.server({\n    root: \"app\",\n    middleware: function(connect, opt) {\n      return [\n        // ...\n      ]\n    }\n  });\n});\n```\n\n## Contributing\n\nTo contribute to this project, you must have CoffeeScript installed: `npm install -g coffee-script`.\n\nThen, to build the `index.js` file, run `coffee -o . -bc src/`. Run `npm test` to run the tests.\n\n## Contributors\n\n* [AveVlad](https://github.com/AveVlad)\n* [schickling](https://github.com/schickling)\n* [justinmchase](https://github.com/justinmchase)\n","readmeFilename":"README.md"}