{"bin":{"webpack-serve":"cli.js"},"bugs":{"url":"https://github.com/webpack/webpack-serve/issues"},"dist":{"shasum":"284d72e98851a4213730e8f27381187252986eb5","tarball":"https://registry.npmjs.org/webpack-serve/-/webpack-serve-1.0.0-beta.1.tgz","fileCount":9,"integrity":"sha512-FHOa5B4/FDsqfeetgEq6qyXVvLvl6nD47wo8lm5iCdfoFH7KJsqThyHULfk55hzLeBJHvdnpwWzHb6dEeYjoew==","signatures":[{"sig":"MEUCIBxmmjFkLM7CRu+ot2YpiYQDCnEZFyMi3zty4/jk/wx9AiEAswCje81vy86SUlVLZRVqJdbsZ5UkfwwSVyVSiUVlKmY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22890},"main":"index.js","name":"webpack-serve","_from":".","files":["lib/","cli.js","index.js"],"author":{"name":"Andrew Powell","email":"andrew@shellscape.org"},"readme":"<div align=\"center\">\n  <a href=\"https://github.com/webpack/webpack\">\n    <img width=\"200\" height=\"200\" src=\"https://webpack.js.org/assets/icon-square-big.svg\">\n  </a>\n</div>\n\n[![npm][npm]][npm-url]\n[![node][node]][node-url]\n[![deps][deps]][deps-url]\n[![tests][tests]][tests-url]\n[![coverage][cover]][cover-url]\n[![chat][chat]][chat-url]\n\n# webpack-serve\n\nA lean, modern, and flexible webpack development server\n\n## Getting Started\n\nTo begin, you'll need to install `webpack-serve`:\n\n```console\n$ npm install webpack-serve --save-dev\n```\n\n## CLI\n\n```console\n$ webpack-serve --help\n\n  Options\n    --config            The webpack config to serve. Alias for <config>.\n    --content           The path from which content will be served\n    --dev               An object containing options for webpack-dev-middleware\n    --host              The host the app should bind to\n    --http2             Instruct the server to use HTTP2\n    --https-cert        Specify a cert to enable https. Must be paired with a key\n    --https-key         Specify a key to enable https. Must be paired with a cert\n    --https-pass        Specify a passphrase to enable https. Must be paired with a pfx file\n    --https-pfx         Specify a pfx file to enable https. Must be paired with a passphrase\n    --log-level         Limit all process console messages to a specific level and above\n                        {dim Levels: trace, debug, info, warn, error, silent}\n    --log-time          Instruct the logger for webpack-serve and dependencies to display a timestamp\n    --no-hot            Instruct the client not to apply Hot Module Replacement patches\n    --no-reload         Instruct middleware {italic not} to reload the page for build errors\n    --open              Instruct the app to open in the default browser\n    --open-app          The name of the app to open the app within\n    --open-path         The path with the app a browser should open to\n    --port              The port the app should listen on\n    --version           Display the webpack-serve version\n\n  Examples\n    $ webpack-serve ./webpack.config.js --no-reload\n```\n\n_Note: The CLI will use your local install of webpack-serve when available,\neven when run globally._\n\n## API\n\nWhen using the API directly, the main entry point  is the `serve` function, which\nis the default export of the module.\n\n```js\nconst serve = require('webpack-serve');\nconst config = require('./webpack.config.js');\n\nserve({ config });\n```\n\n### serve([options])\n\nReturns an `Object` containing:\n\n- `close()` *(Function)* - Closes the server and its dependencies.\n- `on(eventName, fn)` *(Function)* - Binds a serve event to a function. See\n[Events](#events).\n\n#### options\n\nType: `Object`\n\nOptions for initializing and controlling the server provided.\n\n##### compiler\n\nType: `webpack`  \nDefault: `null`\n\nAn instance of a `webpack` compiler. A passed compiler's config will take\nprecedence over `config` passed in options.\n\n##### config\n\nType: `Object`  \nDefault: `{}`\n\nAn object containing the configuration for creating a new `webpack` compiler\ninstance.\n\n##### content\n\nType: `String|[String]`  \nDefault: `[]`\n\nThe path, or array of paths, from which content will be served.\n\n##### dev\n\nType: `Object`  \nDefault: `{ publicPath: '/' }`\n\nAn object containing options for [webpack-dev-middleware][dev-ware].\n\n##### host\n\nType: `Object`  \nDefault: `'localhost'`\n\nSets the host that the `WebSocket` server will listen on. If this doesn't match\nthe host of the server the module is used with, the module will not function\nproperly.\n\n##### hot\n\nType: `Object`  \nDefault: `{}`\n\nAn object containing options for [webpack-hot-client][hot-client].\n\n##### http2\n\nType: `Boolean`  \nDefault: `false`\n\nIf using Node v9 or greater, setting this option to `true` will enable HTTP2\nsupport.\n\n##### https\n\nType: `Object`  \nDefault: `null`\n\nPassing this option will instruct `webpack-serve` to create and serve the webpack\nbundle and accompanying content through a secure server. The object should\ncontain properties matching:\n\n```js\n{\n  key: fs.readFileSync('...key'),   // Private keys in PEM format.\n  cert: fs.readFileSync('...cert'), // Cert chains in PEM format.\n  pfx: <String>,                    // PFX or PKCS12 encoded private key and certificate chain.\n  passphrase: <String>              // A shared passphrase used for a single private key and/or a PFX.\n}\n```\n\nSee the [Node documentation][https-opts] for more information.\n\n##### logLevel\n\nType: `String`  \nDefault: `info`\n\nInstructs `webpack-serve` to output information to the console/terminal at levels\nhigher than the specified level. Valid levels:\n\n```js\n[\n  'trace',\n  'debug',\n  'info',\n  'warn',\n  'error'\n]\n```\n\n##### logTime\n\nType: `Boolean`  \nDefault: `false`\n\nInstruct `webpack-serve` to prepend each line of log output with a `[HH:mm:ss]`\ntimestamp.\n\n##### open\n\nType: `Boolean|Object`  \nDefault: `false`\n\nInstruct the module to open the served bundle in a browser. Accepts an `Object`\nthat matches:\n\n```js\n{\n  app: <String>, // The proper name of the browser app to open.\n  path: <String> // The url path on the server to open.\n}\n```\n\n##### port\n\nType: `Number`  \nDefault: `8080`\n\nThe port the server should listen on.\n\n## Events\n\n`webpack-serve` emits select events which can be subscribed to. For example;\n\n```js\nconst serve = require('webpack-serve');\nconst config = require('./webpack.config.js');\n\nserve({ config });\n\nserve.on('listening', () => {\n  console.log('happy fun time');\n});\n```\n\n#### listening\n\nArguments: _None_\n\n## Add-on Features\n\nA core tenant of `webpack-serve` is to stay lean in terms of feature set, and to\nempower users with familiar and easily portable patterns to implement the same\nfeatures that those familiar with `webpack-dev-server` have come to rely on. This\nmakes the module far easier to maintain, which ultimately benefits the user.\n\nLuckily, flexibility baked into `webpack-serve` makes it a snap to add-on features.\nListed below are some of the add-on patterns that can be found in\n[docs/addons](docs/addons):\n\n- [bonjour](docs/addons/bonjour.config.js)\n- [compress](docs/addons/compress)\n- [historyApiFallback](docs/addons/history-fallback.config.js)\n- [proxy](docs/addons/proxy.config.js)\n- [staticOptions](docs/addons/static-content-options.config.js)\n- [useLocalIp](docs/addons/local-ip.config.js)\n\n## Contributing\n\nWe welcome your contributions! Please have a read of\n[CONTRIBUTING.md](CONTRIBUTING.md) for more information on how to get involved.\n\n## License\n\n#### [MIT](./LICENSE)\n\n[npm]: https://img.shields.io/npm/v/webpack-serve.svg\n[npm-url]: https://npmjs.com/package/webpack-serve\n\n[node]: https://img.shields.io/node/v/webpack-serve.svg\n[node-url]: https://nodejs.org\n\n[deps]: https://david-dm.org/webpack-contrib/webpack-serve.svg\n[deps-url]: https://david-dm.org/webpack-contrib/webpack-serve\n\n[tests]: http://img.shields.io/travis/webpack-contrib/webpack-serve.svg\n[tests-url]: https://travis-ci.org/webpack-contrib/webpack-serve\n\n[cover]: https://codecov.io/gh/webpack-contrib/webpack-serve/branch/master/graph/badge.svg\n[cover-url]: https://codecov.io/gh/webpack-contrib/webpack-serve\n\n[chat]: https://badges.gitter.im/webpack/webpack.svg\n[chat-url]: https://gitter.im/webpack/webpack\n\n[dev-ware]: /webpack/webpack-dev-middleware\n[hot-client]: /webpack-contrib/webpack-hot-client\n[https-opts]: https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options\n","_shasum":"284d72e98851a4213730e8f27381187252986eb5","engines":{"node":">=6"},"gitHead":"e09ae512a66c4d8fe646cacc506ad3602567b325","license":"MIT","scripts":{"ci":"npm run lint && npm run test","lint":"eslint index.js cli.js bin lib test examples","test":"npm run mocha","cover":"nyc report --reporter=text-lcov > coverage.lcov && codecov --token=$WS_CODECOV_TOKEN","mocha":"mocha --require intelli-espower-loader test/test.js --full-trace --check-leaks --exit","beautify":"npm run lint -- --fix"},"_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"homepage":"https://github.com/webpack/webpack-serve","repository":{"url":"git+https://github.com/webpack/webpack-serve.git","type":"git"},"_npmVersion":"3.10.10","description":"A lean, modern, and flexible webpack development server","directories":{},"maintainers":[{"name":"gdi2290","email":"npm@gdi2290.com"},{"name":"jhnns","email":"mail@johannesewald.de"},{"name":"shellscape","email":"andrew@shellscape.org"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"spacek33z","email":"kees@webduck.nl"},{"name":"thelarkinn","email":"sean.larkin@cuw.edu"}],"_nodeVersion":"6.11.3","dependencies":{"koa":"^2.4.1","opn":"^5.1.0","meow":"^4.0.0","chalk":"^2.3.0","debug":"^3.1.0","find-up":"^2.1.0","nanobus":"^4.3.1","get-port":"^3.2.0","killable":"^1.0.0","url-join":"^3.0.0","clipboardy":"^1.2.2","koa-webpack":"^2.0.3","webpack-log":"^1.1.2","import-local":"^1.0.0","loud-rejection":"^1.6.0","update-notifier":"^2.3.0","v8-compile-cache":"^1.1.0","webpack-hot-client":"^1.2.5","@shellscape/koa-static":"^4.0.2"},"publishConfig":{"tag":"next"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^11.4.1","execa":"^0.9.0","mocha":"^5.0.0","sinon":"^4.2.2","eslint":"^4.5.0","codecov":"^3.0.0","webpack":"^3.10.0","istanbul":"^0.4.5","node-fetch":"^2.0.0","strip-ansi":"^4.0.0","mocha-chrome":"^1.0.3","mock-require":"^3.0.1","power-assert":"^1.4.4","eslint-plugin-import":"^2.8.0","eslint-config-webpack":"^1.2.5","intelli-espower-loader":"^1.0.1"},"peerDependencies":{"webpack":"^2.2.0 || ^3.0.0 || ^4.0.0-alpha.2"},"_npmOperationalInternal":{"tmp":"tmp/webpack-serve_1.0.0-beta.1_1518409732284_0.008311051900544042","host":"s3://npm-registry-packages"},"_id":"webpack-serve@1.0.0-beta.1","version":"1.0.0-beta.1"}