GitXplorerGitXplorer
t

build-profiler-webpack-plugin

public
3 stars
0 forks
6 issues

Commits

List of commits on branch master.
Unverified
ccb134c76c4c4d90872a476b238d82103ce491b8

lock file update

tthescientist13 committed 8 years ago
Unverified
77b0628b817f8e7b6c96a44624718431b6c36c11

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

tthescientist13 committed 8 years ago
Unverified
ae26b030b4f1b7853815da2c82566416f375be2c

Technical/issue 14 plugin poc 2 (#16)

tthescientist13 committed 8 years ago
Unverified
056fcd9f798ef44df3394711a816e051671dd62c

update email address (#17)

tthescientist13 committed 8 years ago
Unverified
40f2ab4dda290e5c64510f6e0a4ec6f0c3881518

adding yarn lock file

tthescientist13 committed 8 years ago
Unverified
c7f4101ac314eee0107a7e9f58b380d6de83b470

bump to release version 0.0.1

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.