GitXplorerGitXplorer
t

build-profiler-webpack-plugin

public
3 stars
0 forks
6 issues

Commits

List of commits on branch master.
Unverified
dfbfc0b53154eea05f51a5c7cd3bed53ca7ead71

Technical/issue 10 unit testing (#12)

tthescientist13 committed 8 years ago
Unverified
196e3ead71c2d39e4be21dc790e3e9bb24fcf801

Merge branch 'master' of github.com:thescientist13/webpack-build-profiler

committed 8 years ago
Unverified
9f512f35ec1c634c4c3cb9d91ba2985130850470

add license to README (#9)

tthescientist13 committed 8 years ago
Unverified
6fc8410851e54755b1224af13573f787757e4e3a

add license to README

committed 8 years ago
Unverified
11aaa41f528880ae3e69e819c8d7b136180f57b2

add LICENSE

committed 8 years ago
Unverified
06afbb196cd4fa57e0697240b829c141c3f2a9fc

initial commit of repo files and build task (#8)

tthescientist13 committed 8 years ago

README

The README file for this repository.

build-profiler-webpack-plugin

Overview

A Webpack plugin for getting useful statistics and feedback of your build with threshold and failure options. The advantage being that this plugin will profile your build so that you can be alerted to issues / mistakes in a Webpack configuration like:

  • The build being too big
  • The build being too small
  • Statistics of the build's composition (percantage of JS / CSS / images, etc)
  • Other options TBD

Install

npm install webpack-build-profiler --save-dev

Usage

If you have a production config, include this plugin there

plugins: [
  
  new BuildProfilerPlugin({
    //your options here
  }),

Sample output

== Build Composition ==
JavaScript: 0.8MB
CSS: 0.2MB
Images: 0.5MB

== Build Profile ==
Speed Treshold: 2m
Size Threshold: 1MB - 2MB

Total Bundle Size: 1.5MB
Total Time To Build: 1.56 minutes

== Final Status == 
Success (all metrics within threshold)

Options

{
  timeTreshold:  120,  //# of seconds
  buildSizeTreshold:  {  //in MB
    min:  1,
    max:  2
  },
  buildCompositionTreshold: {  //in MB
    javascript: 1,
    css: 1,
    image: 1
  }
}

LICENSE

Copyright 2017 Owen Buckley

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.