{"name":"webpack-serve-waitpage","description":"Webpack progress wait page for webpack-serve","version":"1.0.2","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/elisherer/webpack-serve-waitpage.git"},"author":{"name":"Eli Sherer","email":"eli.sherer@gmail.com"},"scripts":{"test":"webpack-serve"},"license":"MIT","files":["package.json","README.md","lib/"],"dependencies":{"ejs":"^2.6.1"},"peerDependencies":{"webpack":"^4.0.0","webpack-serve":"^1.0.0 || ^2.0.0"},"devDependencies":{"webpack":"^4.0.0","webpack-serve":"^2.0.0"},"gitHead":"05860d885002b47e90e0f8f0a923f3951e744b81","bugs":{"url":"https://github.com/elisherer/webpack-serve-waitpage/issues"},"homepage":"https://github.com/elisherer/webpack-serve-waitpage#readme","_id":"webpack-serve-waitpage@1.0.2","_npmVersion":"6.1.0","_nodeVersion":"10.2.1","_npmUser":{"name":"elisherer","email":"eli.sherer@gmail.com"},"dist":{"integrity":"sha512-jRarZhbYVDg8Ddn8wtfbyJumUHlX6qBryJtKHyuXYG/cJLEms/7jAph7pMOnFpl7pT0mTncbkDChxeVqdbvqaw==","shasum":"de9b4732532b89fa035402afbe6dbda58cc9e50e","tarball":"http://registry-npm.ywwl.com/webpack-serve-waitpage/download/webpack-serve-waitpage-1.0.2.tgz","fileCount":9,"unpackedSize":14739,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbcH3PCRA9TVsSAnZWagAAGzAP/ieEa2HB6I/wwc0qKT/B\nMNxObVDvYztMfPceMkY+gyNmnSfmUXdfHFJqclDyUaEX3uNkpp2VceyNwxAZ\nz500zWyNGlruZd2DbN+4s3iUb/Jq3HVDQGMnJDxedEYflj8yeQxljnlrNRjF\ndOzxSkbvKmrJ6kRwACwVWWgPGm4RJl2kxV2e3w5xqXV1giaJ3wm3Z/hoa8Qe\nz0FZFbqYZmiHEFRcgzav+2BmMGaCufB5h4MNN6Znt1anP9XZpC6XrU9FJehv\nwJB9Z9m4Usoa4LQPVOsfngcP/XierdDFaVhQoBqlYWZGX3+kxMvPoehBfjiq\nAiSjvb0K6eYRki516fWwjRtBW7rY2x4YNThoEPxujg3/KT009amW1VTxaAId\n8vHVkCFl1+dH393T53L85bYCw3gaS0lTvgsPcXvLuVT8AGO48mx+4fHAM54z\njM39Q4FJiLadVjo6LgiJU8isBSH1lepALGntz+hr1pUMIlGSGYC1maI3fe8p\nV3WaQAiZfND1KdKS4JiGcerXKjr0//SONm2He3oTPsuNQrjxOWSOx5S4h2ic\nLn1iV0tFe7VTjaW0h7wNgnKzKsbk4j+l1GSUrm2rNilcGGA2RqoIlKGmrMvz\nR87wkZQcUVfnXChSPcv3rBQSvu8gLJLEfA3KKgKYGvk71AYS6AYUaoPZCxkj\nLHub\r\n=QZB8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHlAJa8ktKuaWIlFlI09ECcB0P1rZW9HRChkqc45VdY5AiBETfPB56MKBfaeSsHRH+isl90khNnEXR0nzkTLY/gkkg=="}],"size":5540,"noattachment":false,"key":"/webpack-serve-waitpage/-/webpack-serve-waitpage-1.0.2.tgz"},"maintainers":[{"name":"elisherer","email":"eli.sherer@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-serve-waitpage_1.0.2_1534098893731_0.05185047274408827"},"_hasShrinkwrap":false,"readme":"[![npm version](https://badge.fury.io/js/webpack-serve-waitpage.svg)](https://badge.fury.io/js/webpack-serve-waitpage)\n\n# webpack-serve-waitpage\nWebpack progress wait page for [webpack-serve](https://github.com/webpack-contrib/webpack-serve)\n\nInstead of waiting for webpack to finish compiling, see a nice progress wait page.\n\n![screenshot](screenshot.png)\n\n## Installation\n\nnpm\n```\nnpm install -D webpack-serve-waitpage\n```\n\nyarn\n```\nyarn add -D webpack-serve-waitpage\n```\n\n## Usage\n\n#### webpack.config.js\n\nInside the `add` option function of `serve` enter the following line as in the example below:\n\n```js\nconst webpackServeWaitpage = require('webpack-serve-waitpage');\n\n...\n\nmodule.exports.serve = {\n  add: (app, middleware, options) => {\n    // Be sure to pass the options argument from the arguments\n    app.use(webpackServeWaitpage(options));\n\n    // Make sure the usage of webpack-serve-waitpage will be before the following commands if exists\n    // middleware.webpack();\n    // middleware.content();\n  }\n};\n\n```\nYou can also provide options object for the middleware as a second parameter (i.e. `app.use(webpackServeWaitpage(options, {})`) or omit it.\n\n#### Middleware options\n\n| Option |Description|Type|Default Value|\n|--------|-----------|----|-------------|\n|`title`|The window title|String|`\"Development Server\"`|\n|`theme`|Use a predefined theme (Options are: `\"default\"`, `\"dark\"`, `\"material\"`)|String|`\"default\"`|\n|`template`|Provide an alternative `ejs` template (overrides the `theme` option)|String|The predefined template used by the `theme` option|\n|`disableWhenValid`|Whether to stop showing the waitPage after the first compilation (otherwise, will continue to show on hot full page reloads)|Boolean|`true` \n\n* These and any other option would be passed to the global scope of the ejs template.\n\n\n## Themes\n\nThere are other themes to choose from:\n\nDark\n\n![Dark](screenshot3.png)\n\nMaterial\n\n![Material](screenshot2.png)\n\n### *** And you can also create your own! ***\n\n### Developing a new template\n\nYou can clone this repository and use the script `test` to help you develop a new template.\n- Create a new ejs file (e.g. `my-theme.ejs`)\n- Change the `webpack.config.js` filename argument of `testMiddleware` to yours (e.g. `testMiddleware('my-theme.ejs')`).\n- Run `npm t`\n\n#### Template data object\n\nThe `ejs` renderer gets a data object with the following values:\n```js\n{\n    title: \"Development Server\", // the window title\n    webpackVersion: \"4.0.0\", // currently used webpack version\n    webpackServeVersion: \"1.0.0\", // currently used webpack-serve version\n    progress: [ // number of object as number of webpack configurations\n      [\n        0.5, // progress between 0 to 1\n        \"message\", // message from webpack\n        \"0/1000\", // modules progress message\n        \"0 active\", // active modules message\n        \"<some path>\" // path of current module\n      ]\n    ]\n}\n```\n\n","publish_time":1534098895027,"_cnpm_publish_time":1534098895027,"dist-tags":{"latest":"1.0.2"}}