55 <div><sup><em>(for webpack)</em></sup></div>
66 </h1 >
77
8- <a href =" https://travis-ci.org/stephencookdev/speed-measure-webpack-plugin " ><img src =" https://travis-ci.org/stephencookdev/speed-measure-webpack-plugin.svg?branch=master " /></a >
9- <a href =" https://npmjs.com/package/speed-measure-webpack-plugin " ><img src =" https://img.shields.io/npm/dw/speed-measure-webpack-plugin.svg " /></a >
10- <a href =" https://npmjs.com/package/speed-measure-webpack-plugin " ><img src =" https://img.shields.io/node/v/speed-measure-webpack-plugin.svg " /></a >
11- <a href =" https://github.com/prettier/prettier " ><img src =" https://img.shields.io/badge/code_style-prettier-ff69b4.svg " /></a >
8+ <a href =" https://travis-ci.org/stephencookdev/speed-measure-webpack-plugin " ><img src =" https://travis-ci.org/stephencookdev/speed-measure-webpack-plugin.svg?branch=master " /></a >
9+ <a href =" https://npmjs.com/package/speed-measure-webpack-plugin " ><img src =" https://img.shields.io/npm/dw/speed-measure-webpack-plugin.svg " /></a >
10+ <a href =" https://npmjs.com/package/speed-measure-webpack-plugin " ><img src =" https://img.shields.io/node/v/speed-measure-webpack-plugin.svg " /></a >
11+ <a href =" https://github.com/prettier/prettier " ><img src =" https://img.shields.io/badge/code_style-prettier-ff69b4.svg " /></a >
12+
1213</div >
1314<br >
1415
@@ -40,11 +41,8 @@ Change your webpack config from
4041
4142``` javascript
4243const webpackConfig = {
43- plugins: [
44- new MyPlugin (),
45- new MyOtherPlugin ()
46- ]
47- }
44+ plugins: [new MyPlugin (), new MyOtherPlugin ()],
45+ };
4846```
4947
5048to
@@ -55,10 +53,7 @@ const SpeedMeasurePlugin = require("speed-measure-webpack-plugin");
5553const smp = new SpeedMeasurePlugin ();
5654
5755const webpackConfig = smp .wrap ({
58- plugins: [
59- new MyPlugin (),
60- new MyOtherPlugin ()
61- ]
56+ plugins: [new MyPlugin (), new MyOtherPlugin ()],
6257});
6358```
6459
@@ -90,18 +85,18 @@ Default: `"human"`
9085
9186Determines in what format this plugin prints its measurements
9287
93- * ` "json" ` - produces a JSON blob
94- * ` "human" ` - produces a human readable output
95- * ` "humanVerbose" ` - produces a more verbose version of the human readable output
96- * If a function, it will call the function with the JSON blob, and output the response
88+ - ` "json" ` - produces a JSON blob
89+ - ` "human" ` - produces a human readable output
90+ - ` "humanVerbose" ` - produces a more verbose version of the human readable output
91+ - If a function, it will call the function with the JSON blob, and output the response
9792
9893### ` options.outputTarget `
9994
10095Type: ` String|Function ` <br >
10196Default: ` console.log `
10297
103- * If a string, it specifies the path to a file to output to.
104- * If a function, it will call the function with the output as the first parameter
98+ - If a string, it specifies the path to a file to output to.
99+ - If a function, it will call the function with the output as the first parameter
105100
106101### ` options.pluginNames `
107102
@@ -116,14 +111,12 @@ takes an object of `pluginName: PluginConstructor`, e.g.
116111const uglify = new UglifyJSPlugin ();
117112const smp = new SpeedMeasurePlugin ({
118113 pluginNames: {
119- customUglifyName: uglify
120- }
114+ customUglifyName: uglify,
115+ },
121116});
122117
123118const webpackConfig = smp .wrap ({
124- plugins: [
125- uglify
126- ]
119+ plugins: [uglify],
127120});
128121```
129122
@@ -136,12 +129,11 @@ You can configure SMP to include the files that take the most time per loader, w
136129
137130``` javascript
138131const smp = new SpeedMeasurePlugin ({
139- outputFormat: ' humanVerbose' ,
140- loaderTopFiles: 10
132+ outputFormat: " humanVerbose" ,
133+ loaderTopFiles: 10 ,
141134});
142135```
143136
144-
145137### ` options.granularLoaderData ` _ (experimental)_
146138
147139Type: ` Boolean ` <br >
@@ -151,8 +143,8 @@ By default, SMP measures loaders in groups. If truthy, this plugin will give per
151143
152144This flag is _ experimental_ . Some loaders will have inaccurate results:
153145
154- * loaders using separate processes (e.g. ` thread-loader ` )
155- * loaders emitting file output (e.g. ` file-loader ` )
146+ - loaders using separate processes (e.g. ` thread-loader ` )
147+ - loaders emitting file output (e.g. ` file-loader ` )
156148
157149We will find solutions to these issues before removing the _ (experimental)_ flag on this option.
158150
0 commit comments