{"name":"webpack-serve-waitpage","description":"Webpack progress wait page for webpack-serve","version":"1.0.0","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"},"devDependencies":{"webpack":"^4.0.0","webpack-serve":"^1.0.0"},"gitHead":"efe2bf1fc1ba17fbc6a7c0c5f9b9c13e7368d573","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.0","_npmVersion":"6.0.1","_nodeVersion":"10.1.0","_npmUser":{"name":"elisherer","email":"eli.sherer@gmail.com"},"dist":{"integrity":"sha512-KWkHQIqowGaMkbzld3mMbR0LMLBGCmlpk8gBQhhv3VAmpRD+to2/wkOBsKIMR8IedFVcwdGev2k/lruSmV4aWA==","shasum":"182ad1a4a43af4a5db384e0befcd2ed5e3f98287","tarball":"http://registry-npm.ywwl.com/webpack-serve-waitpage/download/webpack-serve-waitpage-1.0.0.tgz","fileCount":8,"unpackedSize":13784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa///RCRA9TVsSAnZWagAAcLoQAIHy97nBR7H/kR+ExbaB\nx+3jXtfobNQxtLRYebR1Gi19JdQrv4UbkqoSTjbNjToik3vP/Xqi8cyEvbHG\n5HsGJCwUWT+lc5r/iNDI/zeYkM3c1eIrIGuwxyctxcrBUgU0HuaIBUuJinQV\nQ7NrVJ4TracwAvXfab3lF917SpAJNOTcVSqjAIeS49kBaBMVQGQyLlYQHOKX\nrgkhbrfUQK0CWsLuRfojDQUcvqQJjBEcfqglU1bL0W6vsUh+gCT6HgIQ+rD7\nJtKO8b9cqpgdxRovb1xELrKlsxbxo7A7ne17QYE7HjKrNzWwukaF3JXXhh8J\n5n+K0OplW5luN9Sn6jhW6XcvC56aNiDkO6PWNbhxw+Eb2tLr61UghO97B8Ty\n3B81/AtRh4TcdU9iE6/sjdF9y98F+eOgRksCyCLi+frM2FapUfntwIp+Xt75\n3GnoeOVyKLYFbf/Q3R+O/65jWd8d7mUA6slLCDMMljPqOlFSp6lDiwc5RBdj\ncxLK0HHXQUV7Jp0fLGQlFMA85NvNrPhqDfTd3AA5dVvE0xRDL0S2pULdu8v6\nDdyfaLGKkA1qb7CvBsB+KJ4vDX1X9xOwUuF/aM71E50HOe5r3oyRoJkCqmT8\ndHfkGWDjYV2JgIixIFgvp5iEbtOILZid2Hb5rRrrmLEbZBLsYNjVHsmNNY/A\n5uSX\r\n=DiSe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEnevmOoNDlzEQJXK7gGttsL2GsqmqTW2+RGqxkxaHMqAiEA8EAfuHNyELIqn+eqZii9fkcY13iKSgARUfnornAUBdA="}],"size":5078,"noattachment":false,"key":"/webpack-serve-waitpage/-/webpack-serve-waitpage-1.0.0.tgz"},"maintainers":[{"name":"elisherer","email":"eli.sherer@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-serve-waitpage_1.0.0_1526726608876_0.023996595335064264"},"_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":1526726608931,"_cnpm_publish_time":1526726608931,"dist-tags":{"latest":"1.0.2"}}