{"name":"webpack-serve-waitpage","description":"Webpack progress wait page for webpack-serve","version":"0.2.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":"0a5b5553ad41f36a53fb265b1e177349c1caa9b5","bugs":{"url":"https://github.com/elisherer/webpack-serve-waitpage/issues"},"homepage":"https://github.com/elisherer/webpack-serve-waitpage#readme","_id":"webpack-serve-waitpage@0.2.0","_npmVersion":"6.0.0","_nodeVersion":"10.0.0","_npmUser":{"name":"elisherer","email":"eli.sherer@gmail.com"},"dist":{"integrity":"sha512-9eUePwP/ygjXqHzesnnNVbgVQ5oo0KunGLnN8z7qNl3ZlWThu2i31cJKRlA8BKHNp8GuCPLcarUJ/tBrFdWVNA==","shasum":"9747c35894d3e1281570f92957f98f1d9fcc6fed","tarball":"http://registry-npm.ywwl.com/webpack-serve-waitpage/download/webpack-serve-waitpage-0.2.0.tgz","fileCount":8,"unpackedSize":11555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa7wcpCRA9TVsSAnZWagAAW9gP/2LwHnkNH7oQjRykg5kM\nd0c9RdHtf3AO/GKKOthYnOgewKG/7KkugErCKKVSV3ss3BOa0wfg1nJ09wjF\njavRuE821pXCBTmK/XkeFgwUUPVs2sqSoURk//IfmO8/DX9Q+LWmFswrroPe\n5KEu0EtQa0eiLmQQ8CwDQkEFWa21O84NCA+3zdpONLOhTffpC+QZEsz0oO/v\nt++RQROOiVUdgnBjNTLmsfNPFIbNFtV9txiQ8AXPB/5VRtILCRvudZXg/7Rl\nZ7u9QrGW9msigvNb0C/jekEGun8OG+L1n+0vUGgz2JWQJXJ7YOEmcjQsiui/\n/TfgJD7Cu+Eay6vszWKr9HwWCaUn9NESwA7iVnI/vcfy2HRxuU48uLRTRcDN\nqQfyYJZaEZB43CCa7HIHYCZjdhY48V6uZJCNpIVDlF3sb+wsVMAbHn7H4t9J\nKyWud2qQRWDeDeehnHIglUVR6wT8gDeX/75VRqkaDQuVanhmXc/p2L+rUfih\nmLo2xZwWy3yj8eLyS9w0EjTOWaqEf9UVIHSIhBFzmqsVmdF+S3aHPBxjkWmD\n+lNmkEuwV9y+T1zEb3gYWfMvQaD4+WF2afIke4kUPu8BzlrBopvPd9VULvC1\n8G0iXvmScluUL7X0CPtb+ytqeNkHlGKJDzBn46KWXb1lH8EWlOhVT0hvd8ff\nn85x\r\n=b759\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaSI0YbZfRjgqiOOv12owMAQjitU6GsiPkB6jTD9v2uAIgWdH65EyXsVXzOblmfwJpSA/1ouxcTDYoh7aUyBBpohU="}],"size":4345,"noattachment":false,"key":"/webpack-serve-waitpage/-/webpack-serve-waitpage-0.2.0.tgz"},"maintainers":[{"name":"elisherer","email":"eli.sherer@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-serve-waitpage_0.2.0_1525614376595_0.161815827175386"},"_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":1525614376678,"_cnpm_publish_time":1525614376678,"dist-tags":{"latest":"1.0.2"}}