1.0.1 • Published 9 years ago

webpack-speed-rank v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

webpack-speed-rank

npm.io npm.io npm.io npm.io npm.io

Speed rank for webpack build

Do you want to know how slow is your build compared to others? Install this plugin and it will tell you.

For example, you can show customized infomation in console like this:

耗时 8732 ms,打败了 XXX % 的build

Documents

RankPlugin(redisOptions,callback)

Parameters:

redisOptions

{
 host:'127.0.0.1',
 port:6379
}

or

redis://localhost:6379

callback(error,stats)

stats is an object looking like this

{
startTime: // start time of the build
endTime: // end time of the build
duration: // duration of the build in ms
rank: // rank percentage
}

Dependency

webpack-speed-rank relies on Redis server, by default it will connect to localhost:6379

Usage:

Modify you webpack configuration file

 var RankPlugin= require('webpack-speed-rank');

 plugins:[
  ...
  ,new RankPlugin({
                    host:'127.0.0.1',
                    port: 6379
                  },function (e,stats) {
                      console.log('耗时 %d ms,打败了 %d % 的build', stats.duration, stats.rank);
                  });
 ]
 
1.0.1

9 years ago

1.0.0

9 years ago

0.1.0

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago