{"_id":"webpack-format-messages","_rev":"387850","name":"webpack-format-messages","description":"Beautiful formatting for Webpack messages; ported from Create React App!","dist-tags":{"latest":"3.0.1"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"time":{"modified":"2021-08-04T03:39:23.000Z","created":"2017-07-21T02:10:22.388Z","3.0.1":"2021-07-22T19:10:11.666Z","3.0.0":"2021-07-21T23:23:23.622Z","2.0.6":"2019-11-23T21:56:55.390Z","2.0.5":"2018-12-02T00:19:02.599Z","2.0.4":"2018-11-22T20:24:30.665Z","2.0.3":"2018-07-21T05:30:09.297Z","2.0.2":"2018-07-10T17:02:23.202Z","2.0.1":"2018-05-15T16:23:32.309Z","1.0.2":"2018-03-10T20:14:38.241Z","1.0.1":"2017-08-23T18:01:41.811Z","1.0.0":"2017-07-21T02:10:22.388Z"},"users":{},"author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"https://lukeed.com"},"repository":{"type":"git","url":"git+https://github.com/lukeed/webpack-format-messages.git"},"versions":{"3.0.1":{"version":"3.0.1","name":"webpack-format-messages","repository":{"type":"git","url":"git+https://github.com/lukeed/webpack-format-messages.git"},"description":"Beautiful formatting for Webpack messages; ported from Create React App!","module":"index.mjs","main":"index.js","types":"index.d.ts","license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"https://lukeed.com"},"engines":{"node":">=6"},"exports":{".":{"import":"./index.mjs","require":"./index.js"},"./package.json":"./package.json"},"scripts":{"build":"bundt"},"dependencies":{"kleur":"^4.0.0"},"devDependencies":{"bundt":"1.1.2"},"keywords":["create-react-app","console","messages","webpack","pretty","format","stats","output"],"gitHead":"12523a11e21ef2f98d886a8e3c60ea92220578cf","bugs":{"url":"https://github.com/lukeed/webpack-format-messages/issues"},"homepage":"https://github.com/lukeed/webpack-format-messages#readme","_id":"webpack-format-messages@3.0.1","_nodeVersion":"14.15.3","_npmVersion":"6.14.9","dist":{"shasum":"14f5161d0257918c178df3b9f600323826039fbb","size":3632,"noattachment":false,"key":"/webpack-format-messages/-/webpack-format-messages-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/webpack-format-messages/download/webpack-format-messages-3.0.1.tgz"},"_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"directories":{},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-format-messages_3.0.1_1626981011562_0.9946590766133967"},"_hasShrinkwrap":false,"publish_time":1626981011666,"_cnpm_publish_time":1626981011666},"3.0.0":{"version":"3.0.0","name":"webpack-format-messages","repository":{"type":"git","url":"git+https://github.com/lukeed/webpack-format-messages.git"},"description":"Beautiful formatting for Webpack messages; ported from Create React App!","module":"index.mjs","main":"index.js","types":"index.d.ts","license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"https://lukeed.com"},"engines":{"node":">=6"},"exports":{".":{"import":"./index.mjs","require":"./index.js"},"./package.json":"./package.json"},"scripts":{"build":"bundt"},"dependencies":{"kleur":"^4.0.0"},"devDependencies":{"bundt":"1.1.5"},"keywords":["create-react-app","console","messages","webpack","pretty","format","stats","output"],"gitHead":"bb7d5ed7375dbdcf08833d637fd52e429b3305b4","bugs":{"url":"https://github.com/lukeed/webpack-format-messages/issues"},"homepage":"https://github.com/lukeed/webpack-format-messages#readme","_id":"webpack-format-messages@3.0.0","_nodeVersion":"14.15.3","_npmVersion":"6.14.9","dist":{"shasum":"ac48dc7797a096fd303a172649f4566b20dab09c","size":3623,"noattachment":false,"key":"/webpack-format-messages/-/webpack-format-messages-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/webpack-format-messages/download/webpack-format-messages-3.0.0.tgz"},"_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"directories":{},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-format-messages_3.0.0_1626909803493_0.5425784069174631"},"_hasShrinkwrap":false,"publish_time":1626909803622,"_cnpm_publish_time":1626909803622},"2.0.6":{"name":"webpack-format-messages","version":"2.0.6","description":"Beautiful formatting for Webpack messages; ported from Create React App!","repository":{"type":"git","url":"git+https://github.com/lukeed/webpack-format-messages.git"},"license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"keywords":["create-react-app","console","messages","webpack","pretty","format","stats","output"],"dependencies":{"kleur":"^3.0.0"},"gitHead":"d4f98a0c8c4c638edb5fa5a1b975d7c8e918741d","bugs":{"url":"https://github.com/lukeed/webpack-format-messages/issues"},"homepage":"https://github.com/lukeed/webpack-format-messages#readme","_id":"webpack-format-messages@2.0.6","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"d8bb0d4fb2e9171efc8a252d6294f29c50d7ecd2","size":3224,"noattachment":false,"key":"/webpack-format-messages/-/webpack-format-messages-2.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/webpack-format-messages/download/webpack-format-messages-2.0.6.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-format-messages_2.0.6_1574546215255_0.5701176420177629"},"_hasShrinkwrap":false,"publish_time":1574546215390,"_cnpm_publish_time":1574546215390},"2.0.5":{"name":"webpack-format-messages","version":"2.0.5","description":"Beautiful formatting for Webpack messages; ported from Create React App!","repository":{"type":"git","url":"git+https://github.com/lukeed/webpack-format-messages.git"},"license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"keywords":["create-react-app","console","messages","webpack","pretty","format","stats","output"],"dependencies":{"kleur":"^3.0.0"},"gitHead":"bd5be78b3dfe8aeb7a2cd5c974653b50fef44e36","bugs":{"url":"https://github.com/lukeed/webpack-format-messages/issues"},"homepage":"https://github.com/lukeed/webpack-format-messages#readme","_id":"webpack-format-messages@2.0.5","scripts":{},"_shasum":"399d0e3b774892ec03a51f09ff5e00e8a25aef18","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"399d0e3b774892ec03a51f09ff5e00e8a25aef18","size":3147,"noattachment":false,"key":"/webpack-format-messages/-/webpack-format-messages-2.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/webpack-format-messages/download/webpack-format-messages-2.0.5.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-format-messages_2.0.5_1543709942501_0.5332446766377712"},"_hasShrinkwrap":false,"publish_time":1543709942599,"_cnpm_publish_time":1543709942599},"2.0.4":{"name":"webpack-format-messages","version":"2.0.4","description":"Beautiful formatting for Webpack messages; ported from Create React App!","repository":{"type":"git","url":"git+https://github.com/lukeed/webpack-format-messages.git"},"license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"keywords":["create-react-app","console","messages","webpack","pretty","format","stats","output"],"dependencies":{"kleur":"^3.0.0"},"gitHead":"ca942c857ac8d46c61e50fce3799e8b3961215e1","bugs":{"url":"https://github.com/lukeed/webpack-format-messages/issues"},"homepage":"https://github.com/lukeed/webpack-format-messages#readme","_id":"webpack-format-messages@2.0.4","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"ba6a7c521e7f4d56c791a72d5cd21dad36f8c3c9","size":3109,"noattachment":false,"key":"/webpack-format-messages/-/webpack-format-messages-2.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/webpack-format-messages/download/webpack-format-messages-2.0.4.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-format-messages_2.0.4_1542918270558_0.5653488423599922"},"_hasShrinkwrap":false,"publish_time":1542918270665,"_cnpm_publish_time":1542918270665},"2.0.3":{"name":"webpack-format-messages","version":"2.0.3","description":"Beautiful formatting for Webpack messages; ported from Create React App!","repository":{"type":"git","url":"git+https://github.com/lukeed/webpack-format-messages.git"},"license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"files":["index.js"],"keywords":["create-react-app","console","messages","webpack","pretty","format","stats","output"],"dependencies":{"kleur":"^2.0.1"},"gitHead":"3c1adc5585daa2db58c592106a7ac8635bd1f9f2","bugs":{"url":"https://github.com/lukeed/webpack-format-messages/issues"},"homepage":"https://github.com/lukeed/webpack-format-messages#readme","_id":"webpack-format-messages@2.0.3","_npmVersion":"6.1.0","_nodeVersion":"10.4.1","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"5a9eebae91a91962c3d1f5d515497e0701532df2","size":3108,"noattachment":false,"key":"/webpack-format-messages/-/webpack-format-messages-2.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/webpack-format-messages/download/webpack-format-messages-2.0.3.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-format-messages_2.0.3_1532151009234_0.2919237089818947"},"_hasShrinkwrap":false,"publish_time":1532151009297,"_cnpm_publish_time":1532151009297},"2.0.2":{"name":"webpack-format-messages","version":"2.0.2","description":"Beautiful formatting for Webpack messages; ported from Create React App!","repository":{"type":"git","url":"git+https://github.com/lukeed/webpack-format-messages.git"},"license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"files":["index.js"],"keywords":["create-react-app","console","messages","webpack","pretty","format","stats","output"],"dependencies":{"kleur":"^1.0.0"},"gitHead":"3d804d0e14cd26940ca1b8c28e5c8b06b728c844","bugs":{"url":"https://github.com/lukeed/webpack-format-messages/issues"},"homepage":"https://github.com/lukeed/webpack-format-messages#readme","_id":"webpack-format-messages@2.0.2","scripts":{},"_shasum":"de84f2aca79342f0ce486da0e62e5678b9319b1e","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"de84f2aca79342f0ce486da0e62e5678b9319b1e","size":3143,"noattachment":false,"key":"/webpack-format-messages/-/webpack-format-messages-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/webpack-format-messages/download/webpack-format-messages-2.0.2.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-format-messages_2.0.2_1531242143101_0.7713041242490484"},"_hasShrinkwrap":false,"publish_time":1531242143202,"_cnpm_publish_time":1531242143202},"2.0.1":{"name":"webpack-format-messages","version":"2.0.1","description":"Beautiful formatting for Webpack messages; ported from Create React App!","repository":{"type":"git","url":"git+https://github.com/lukeed/webpack-format-messages.git"},"license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"files":["index.js"],"keywords":["create-react-app","console","messages","webpack","pretty","format","stats","output"],"dependencies":{"ansi-colors":"^2.0.1"},"gitHead":"8c3c23f62199ee22bb40973219fd16f67c4a84be","bugs":{"url":"https://github.com/lukeed/webpack-format-messages/issues"},"homepage":"https://github.com/lukeed/webpack-format-messages#readme","_id":"webpack-format-messages@2.0.1","scripts":{},"_shasum":"81650be9836241f485e2a59a3c13b60e59bc3493","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"81650be9836241f485e2a59a3c13b60e59bc3493","size":3149,"noattachment":false,"key":"/webpack-format-messages/-/webpack-format-messages-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/webpack-format-messages/download/webpack-format-messages-2.0.1.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-format-messages_2.0.1_1526401412211_0.9781048007603179"},"_hasShrinkwrap":false,"publish_time":1526401412309,"_cnpm_publish_time":1526401412309},"1.0.2":{"name":"webpack-format-messages","version":"1.0.2","description":"Beautiful formatting for Webpack messages; ported from Create React App!","repository":{"type":"git","url":"git+https://github.com/lukeed/webpack-format-messages.git"},"license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=4"},"files":["index.js"],"keywords":["create-react-app","console","messages","webpack","pretty","format","stats","output"],"dependencies":{"clorox":"^1.0.3"},"gitHead":"14f27a8a776a7b700aee7f1b04dd7dc8d36ffe9a","bugs":{"url":"https://github.com/lukeed/webpack-format-messages/issues"},"homepage":"https://github.com/lukeed/webpack-format-messages#readme","_id":"webpack-format-messages@1.0.2","scripts":{},"_shasum":"875dba643e4a59af7183413ed79dea3949b51655","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.0","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"875dba643e4a59af7183413ed79dea3949b51655","size":3135,"noattachment":false,"key":"/webpack-format-messages/-/webpack-format-messages-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/webpack-format-messages/download/webpack-format-messages-1.0.2.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-format-messages_1.0.2_1520712878199_0.8740094572833161"},"_hasShrinkwrap":false,"publish_time":1520712878241,"_cnpm_publish_time":1520712878241},"1.0.1":{"name":"webpack-format-messages","version":"1.0.1","description":"Beautiful formatting for Webpack messages; ported from Create React App!","repository":{"type":"git","url":"git+https://github.com/lukeed/webpack-format-messages.git"},"license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=4"},"files":["index.js"],"keywords":["create-react-app","console","messages","webpack","pretty","format","stats","output"],"dependencies":{"chalk":"^2.0.1"},"gitHead":"020e0a5b98a11884c9c3d3f828a2a906ce00236e","bugs":{"url":"https://github.com/lukeed/webpack-format-messages/issues"},"homepage":"https://github.com/lukeed/webpack-format-messages#readme","_id":"webpack-format-messages@1.0.1","scripts":{},"_shasum":"e13e32d69d8991d4246e1f3c9f1fa7b4782d6d11","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"e13e32d69d8991d4246e1f3c9f1fa7b4782d6d11","size":3145,"noattachment":false,"key":"/webpack-format-messages/-/webpack-format-messages-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/webpack-format-messages/download/webpack-format-messages-1.0.1.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-format-messages-1.0.1.tgz_1503511300502_0.7133641506079584"},"directories":{},"publish_time":1503511301811,"_hasShrinkwrap":false,"_cnpm_publish_time":1503511301811},"1.0.0":{"name":"webpack-format-messages","version":"1.0.0","description":"Beautiful formatting for Webpack messages; ported from Create React App!","repository":{"type":"git","url":"git+https://github.com/lukeed/webpack-format-messages.git"},"license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=4"},"files":["index.js"],"keywords":["create-react-app","console","messages","webpack","pretty","format","stats","output"],"dependencies":{"chalk":"^2.0.1"},"gitHead":"4c5a541da56608ed00dc0e25cf26b93d7d544e8f","bugs":{"url":"https://github.com/lukeed/webpack-format-messages/issues"},"homepage":"https://github.com/lukeed/webpack-format-messages#readme","_id":"webpack-format-messages@1.0.0","scripts":{},"_shasum":"b046e67c7a55fe6a5ac9e34d41e1869d9373dc04","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"b046e67c7a55fe6a5ac9e34d41e1869d9373dc04","size":3079,"noattachment":false,"key":"/webpack-format-messages/-/webpack-format-messages-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/webpack-format-messages/download/webpack-format-messages-1.0.0.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-format-messages-1.0.0.tgz_1500603022265_0.7772323312237859"},"directories":{},"publish_time":1500603022388,"_cnpm_publish_time":1500603022388,"_hasShrinkwrap":false}},"readme":"# webpack-format-messages\n\n> Beautiful formatting for Webpack messages; ported from [Create React App](https://github.com/facebookincubator/create-react-app)!\n\nThe console output from CRA is very well-done! Unfortunately, the only way to use it is to install _all_ of `react-dev-utils`, which is quite a module-rich tree. While there is **nothing** wrong with this, many times I'd prefer a quick install for my custom Webpack configs (which aren't always React-related).\n\nIf you are already using `react-dev-utils`, you do not need this module and should do this instead:\n\n```js\nconst formatMessages = require('react-dev-utils/formatWebpackMessages');\n```\n\n#### Differences\n\nThe source code of this module is (nearly) a direct copy-paste of the original file. Only two modifications have been made:\n\n1. The code has been tailored to run in a Node-specific environment --- the original can also be run in the browser.\n2. The module input expects a Webpack `stats` object --- the original required a `toJson()` transformation\n\n\n## Install\n\n```\n$ npm install webpack-format-messages --save-dev\n```\n\n\n## Usage\n\n```js\nconst webpack = require('webpack');\nconst formatMessages = require('webpack-format-messages');\n// or\nconst { formatMessages } = require('webpack-format-messages');\n\nconst compiler = webpack(/* config */);\n\ncompiler.hooks.invalid.tap('invalid', function() {\n  console.log('Compiling...');\n});\n\ncompiler.hooks.done.tap('done', (stats) => {\n  const messages = formatMessages(stats);\n\n  if (!messages.errors.length && !messages.warnings.length) {\n    console.log('Compiled successfully!');\n  }\n\n  if (messages.errors.length) {\n    console.log('Failed to compile.');\n    messages.errors.forEach(e => console.log(e));\n    return;\n  }\n\n  if (messages.warnings.length) {\n    console.log('Compiled with warnings.');\n    messages.warnings.forEach(w => console.log(w));\n  }\n});\n```\n\n\n## API\n\n### formatMessages(stats)\nReturns: `{ errors: string[], warnings: string[] }`\n\nExtracts & prettifies warning and error messages from Webpack.\n\n> **Note:** This is also the `default` export.\n\n#### stats\n\nType: `Object`\n\nA Webpack [`stats`](https://github.com/webpack/docs/wiki/node.js-api#stats) object.\n\n\n### formatMessage(message)\nReturns: `string`\n\nTransforms an individual webpack `stats` message object into a string.\n\n> **Note:** You probably don't want to use this directly! It's used by `formatMessages` for you.\n\n## Related\n\n* [`webpack-messages`](https://github.com/lukeed/webpack-messages) -- Wraps this module as a Webpack plugin, with lifecycle hooks\n\n\n## Credits\n\nThis module is pulled directly from [`react-dev-utils`](https://github.com/facebookincubator/create-react-app/tree/master/packages/react-dev-utils), provided by Facebook Incubator.\n\nThis package exists solely as a standalone install~!\n","_attachments":{},"homepage":"https://github.com/lukeed/webpack-format-messages#readme","bugs":{"url":"https://github.com/lukeed/webpack-format-messages/issues"},"license":"MIT"}