{"name":"webpack-serve-waitpage","description":"Webpack progress wait page for webpack-serve","version":"0.3.0","main":"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","index.js","default.ejs","dark.ejs","material.ejs"],"dependencies":{"ejs":"^2.6.1"},"peerDependencies":{"webpack":"^4.0.0","webpack-serve":"^0.3.1"},"devDependencies":{"webpack":"^4.0.0","webpack-serve":"^0.3.1"},"gitHead":"44e1b241228e990aab9c3660390453c1a30a799f","bugs":{"url":"https://github.com/elisherer/webpack-serve-waitpage/issues"},"homepage":"https://github.com/elisherer/webpack-serve-waitpage#readme","_id":"webpack-serve-waitpage@0.3.0","_npmVersion":"6.0.0","_nodeVersion":"10.0.0","_npmUser":{"name":"elisherer","email":"eli.sherer@gmail.com"},"dist":{"integrity":"sha512-fnfI5pwZ6YXDVm0HtB2b9vnTzP1QBaIkSu6cNg1/wbEUDpTBdIZKi0VEMw/Z7LCMfVBD6qIewKMKP5qI3Zu8wQ==","shasum":"dab289478b57f1167b70dedd58875c60526e18da","tarball":"http://registry-npm.ywwl.com/webpack-serve-waitpage/download/webpack-serve-waitpage-0.3.0.tgz","fileCount":8,"unpackedSize":12898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa8r1iCRA9TVsSAnZWagAAdxwP+wf3O04f113thXnm8kxI\nqZrzJZkwzZyvFF219yOECPI7MY5XchAbOd3hdYPc16dqgddnyhCq1Xe2WZLZ\npd/UsN6QjGHwT9mG6dalICw0GCEDbV8qop4CryPTm3pc04UdpnC/m+h8EUL+\nrs7JbzNufxwckDlCKmd3xvAxpGNnR5wxRezj5OV6SkuYPhwvN1irwLP8GT4A\nGc6/3JDIZOuKra4wpJhYjkFBidkcxePMC41Jc6GnpO4zoTJyS4d8MkSpcNXK\nWo4QyH46bBiN/wurShJiwPWNr/J2TxlYTcO/5zep6eguHgDgij+nlCC9FUHq\nYP1/w3DQaa9aNNPrbYesXiX0d0bj84Oi9FvGw8oBVSxJXPtGyCEbyFitIGQr\nk3kj3MbZBAzz07gNQivWd2Vgu7yPdfx7MwxGwjdqGmhuDlvN0Bv0yTmgmJ/o\noMM06RSa87fcRpmurdnJ180GUCus5LLRgT92gw1u2dw3lqgeKInjXFb7OlY7\nJJ2sbchqPOl5IuCKtQD782r/IIH/PtN5WWe9Bx4FQg9sY1nojmu46roPOGt5\nqpbV+OnyCRmcsNuFUiqLPJFO2BLvuWe4p5pRubpl1QW85hDs5N1OfHpwJo+M\nkjgC27VniSzjnfjirIKQPzNZQhSvWueppsLaTW3pDZbRxnStecmaQFgufvm4\n/HTR\r\n=ICow\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDC4EAzTWxnbH777SZom5azez3B6H6neCbBJmiU8hPU+gIhAO3tYeEHiQx9mqZWSg76Ha5bAlPjzVJTGVnL1pBJEXd/"}],"size":4787,"noattachment":false,"key":"/webpack-serve-waitpage/-/webpack-serve-waitpage-0.3.0.tgz"},"maintainers":[{"name":"elisherer","email":"eli.sherer@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-serve-waitpage_0.3.0_1525857634127_0.8063481908130901"},"_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":1525857634234,"_cnpm_publish_time":1525857634234,"dist-tags":{"latest":"1.0.2"}}