Skip to content

j-m/browsability

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
bin
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

logo

not ready for production version downloads per week semantic versioning commitizen friendly

About

Scan your HTML, CSS, and JavaScript to find out the minimum browser version that you support.
No guessing. No arduous tests. Just data.

Browsability is designed to be run as a CLI tool, no webdrivers or complex emulation. For now, we use just MDN's compatibility data, so you can only assess these browsers.

Quick links

Roadmap
Changelog
Docs

Getting Started

Installation

npm i -D browsability

Commands

browsability -v (or --version)       (Output Browsability version)
browsability -h (or --help)          (Output the help information)
browsability --init <directory>      (Copy Browsability template to relative or absolute path)
browsability <directory> <flag>      (Glob pattern of files to run Browsability against <directory>)  
browsability                         (Run with default settings)

Where <directory> is a relative (starting with ./) or absolute filepath.
Where <flag> is any combination of the optional arguments:

-s (or --silent)                   (No console output)
-c (or --config) <directory>       (Configuration file location)
-f (or --full)                     (Report minimum version for all browsers, not just those configured)

Settings

Refer to the docs for all options and what each command could throw.
Example .browsability.js file:

[{
  scope: 'full'           // 'full': assess everything. 'diff': assess changes only (requires git)
  css: true               // Assess CSS  
  html: true              // Assess HTML  
  javascript: true        // Assess JavaScript  
  include: [              // List of files to scan. Glob enabled  
    "./**/*"
  ]
  exclude: [              // List of files to exclude from the scan. Glob enabled  
    "**/node_modules/**"
  ]
  versions: {             // The minimum browser version that your project must support  
    chrome: 62
    safari: "current"     // Matches the 'status' attributes in `mdn/browser-compat-data/browsers`  
    edge: 16
    ie: 11
  },
  assess: [               // Find minimum browser version support without throwing. e.g. 'all' or ['firefox']
    'firefox'
  ]
}]

Contributors

j-m
j-m
jmsv
jmsv