项目作者: pajaydev

项目描述 :
📊 Analyzing bundles created by Lasso js.
高级语言: JavaScript
项目地址: git://github.com/pajaydev/lasso-analyzer.git
创建时间: 2018-07-14T06:21:08Z
项目社区:https://github.com/pajaydev/lasso-analyzer

开源协议:MIT License

下载


lasso-analyzer

npm version
Build Status

Lasso-analyzer is a tool for analyzing project bundles created by Lasso. We can easily catch the large and/or duplicate modules which might be either bloating up
your bundle.

This package uses treemap for visualiztion.

Installation

  1. npm install -g lasso-analyzer

Usage as plugin

  1. require('lasso').configure({
  2. ...
  3. plugins: [
  4. 'lasso-analyzer',
  5. ...
  6. ]
  7. });

Usage as CLI

  1. Bundled file is created under “build/static/“ folder. Run the CLI as shown below
  1. lasso-analyzer <--bundle path--> --output <--output filename-->

Creates outputFilename.html in your project structure.

  1. Options:
  2. --output To change the generated output filename. (default - lasso-analyze.html)
  3. --c Visualize the bundle with colors

For Example:

a. Analyze js bundle file.

  1. lasso-analyzer static/build.js

or

b. Analyze all the files inside particular folder and create lasso-analyze.html.

  1. lasso-analyzer static

c. Bundle with colors

  1. lasso-analyzer static --c
  1. lasso-analyze.html file is created in root path of your project structure.
  1. open lasso-analyze.html
  1. It shows you a treemap visualization as shown below.

Output

Creates lasso-analyze.html in your project directory.


lasso-analyzer

Issues

Free feel to create bug or propose improvements.