{"name":"speed-measure-webpack-plugin","version":"1.0.0-beta-0","description":"Measure + analyse the speed of your webpack loaders and plugins","main":"index.js","scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/stephencookdev/speed-measure-webpack-plugin.git"},"author":{"name":"Stephen Cook","email":"stephen@stephencookdev.co.uk"},"license":"ISC","bugs":{"url":"https://github.com/stephencookdev/speed-measure-webpack-plugin/issues"},"homepage":"https://github.com/stephencookdev/speed-measure-webpack-plugin#readme","engines":{"node":">=6.0.0"},"peerDependencies":{"webpack":"^1"},"devDependencies":{"jest":"^22.3.0","prettier":"1.10.2"},"readme":"<div align=\"center\">\n  <img width=\"120\" height=\"120\" src=\"https://rawgit.com/stephencookdev/speed-measure-webpack-plugin/master/logo.svg\">\n  <h1>\n    Speed Measure Plugin\n    <div><sup><em>(for webpack)</em></sup></div>\n  </h1>\n</div>\n<br>\n\nThe first step to optimising your webpack build speed, is to know where to focus your attention.\n\nThis plugin measures your webpack build speed, giving an output like this:\n\n![Preview of Speed Measure Plugin's output](preview.png)\n\n## Install\n\n```bash\nnpm install --save speed-measure-webpack-plugin\n```\n\nor\n\n```bash\nyarn add speed-measure-webpack-plugin\n```\n\n## Usage\n\nChange your webpack config from\n\n```javascript\nconst webpackConfig = {\n  plugins: [\n    new MyPlugin(),\n    new MyOtherPlugin()\n  ]\n}\n```\n\nto\n\n```javascript\nconst SpeedMeasurePlugin = require(\"speed-measure-webpack-plugin\");\n\nconst smp = new SpeedMeasurePlugin();\n\nconst webpackConfig = smp.wrap({\n  plugins: [\n    new MyPlugin(),\n    new MyOtherPlugin()\n  ]\n});\n```\n\nand you're done! SMP will now be printing timing output to the console by default\n\n## Options\n\nOptions are (optionally) passed in to the constructor\n\n```javascript\nconst smp = new SpeedMeasurePlugin(options);\n```\n\n### `options.disable`\n\nType: `Boolean`<br>\nDefault: `false`\n\nIf truthy, this plugin does nothing at all. It is recommended to set this with something similar to `{ disable: !process.env.MEASURE }` to allow opt-in measurements with a `MEASURE=true npm run build`\n\n### `options.outputFormat`\n\nType: `String|Function`<br>\nDefault: `\"human\"`\n\nDetermines in what format this plugin prints its measurements\n\n * `\"json\"` - produces a JSON blob\n * `\"human\"` - produces a human readable output\n * `\"humanVerbose\"` - produces a more verbose version of the human readable output\n * If a function, it will call the function with the JSON blob being the first parameter, and just the response of the function as the output\n\n### `options.outputTarget`\n\nType: `String|Function`<br>\nDefault: `console.log`\n\n* If a string, it specifies the path to a file to output to.\n* If a function, it will call the function with the output as the first parameter\n\n### `options.pluginNames`\n\nType: `Object`<br>\nDefault: `{}`\n\nBy default, SMP derives plugin names through `plugin.constructor.name`. For some\nplugins this doesn't work (or you may want to override this default). This option\ntakes an object of `pluginName: PluginConstructor`, e.g.\n\n```javascript\nconst uglify = new UglifyJSPlugin();\nconst smp = new SpeedMeasurePlugin({\n  pluginNames: {\n    customUglifyName: uglify\n  }\n});\n\nconst webpackConfig = smp.wrap({\n  plugins: [\n    uglify\n  ]\n});\n```\n\n### `options.granularLoaderData` _(experimental)_\n\nType: `Boolean`<br>\nDefault: `false`\n\nIf truthy, this plugin will attempt to break down the loader timing data to give per-loader timing information.\n\nPoints of note that the following loaders will have inaccurate results in this mode:\n\n * loaders using separate processes (e.g. `thread-loader`) - these make it difficult to get timing information on the subsequent loaders, as they're not attached to the main thread\n * loaders emitting file output (e.g. `file-loader`) - the time taken in outputting the actual file is not included in the running time of the loader\n\nThese are restrictions from technical limitations - ideally we would find solutions to these problems before removing the _(experimental)_ flag on this options\n","readmeFilename":"README.md","gitHead":"cd7fd2c6bc9840c3d0e502851c76942df46362c2","_id":"speed-measure-webpack-plugin@1.0.0-beta-0","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"stephencookdev","email":"stephen@stephencookdev.co.uk"},"dist":{"integrity":"sha512-9/bWyA6zF+wjs2GvnHMwi9TSfJKNqfMaLhIsn/t8NJQ6rcqYDCAmV73FG9o18WqcjRAOR4EoLYxZdwtPRYOrWg==","shasum":"bce4c193a86a408c1819bf27aa598db9b8460807","tarball":"http://registry-npm.ywwl.com/speed-measure-webpack-plugin/download/speed-measure-webpack-plugin-1.0.0-beta-0.tgz","fileCount":13,"unpackedSize":293448,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgxg7FIevfuUCtCok9M6QzQ/FoUP/kuhnpJ0Guci8GHQIhAKzjswlvgsbgqQKPsSetuigIRWagGnqYoIt48oii+qHn"}],"size":201709,"noattachment":false,"key":"/speed-measure-webpack-plugin/-/speed-measure-webpack-plugin-1.0.0-beta-0.tgz"},"maintainers":[{"name":"stephencookdev","email":"stephen@stephencookdev.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/speed-measure-webpack-plugin_1.0.0-beta-0_1519029873182_0.5114878375361158"},"_hasShrinkwrap":false,"publish_time":1519029873254,"_cnpm_publish_time":1519029873254,"dist-tags":{"beta":"1.0.0-beta-1","latest":"1.6.0"}}