Coder Social home page Coder Social logo

grunt-websize's Introduction

Grunt plugin for logging web page size

Heads up! This grunt task needs phantomjs to be installed!

This grunt task is able to summarize the asset size of a single web site page. Additionally it can track how much data transferred after the site has finished loading.

Options

  • url
    target url, what needs to be downloaded and measured. It could be an enitre website or just a file from the web
  • timeout
    timeout after the website has loaded. With setting this value you can measure the additional downloads your side does (like loading facebook like button or ads)
  • reportPath
    report file output. It's going to be a JSON file with summarized and grouped information about the assets of the target website
  • append
    set to true, if you would like to keep history of the reports
  • historyLength
    maximum history length

Install

npm install git+ssh://[email protected]:tiborbotos/grunt-websize.git#master --save-dev

Sample output

The task creates a file with a json output.

{
   "pageload":{
      "files":20,
      "size":502317,
      "html":{
         "size":67745,
         "files":1
      },
      "image":{
         "size":63440,
         "files":9
      },
      "javascript":{
         "size":253241,
         "files":6
      },
      "other":{
         "size":117891,
         "files":4
      },
      "domains":[
         "http://something.com",
         "data:image",
      ]
   },
   "afterload":{
      "files":36,
      "size":455787,
      "html":{
         "size":124372,
         "files":9
      },
      "image":{
         "size":5535,
         "files":9
      },
      "javascript":{
         "size":178846,
         "files":5
      },
      "other":{
         "size":147034,
         "files":13
      },
      "domains":[
         "http://facebook.com"
      ]
   }
}

grunt-websize's People

Contributors

tiborbotos avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.