项目作者: j-m

项目描述 :
Browser compatibility analyser
高级语言: JavaScript
项目地址: git://github.com/j-m/browsability.git
创建时间: 2018-02-24T10:40:35Z
项目社区:https://github.com/j-m/browsability

开源协议:MIT License

下载




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.

Roadmap
Changelog
Docs

Getting Started

Installation

  1. npm i -D browsability

Commands

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

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

  1. -s (or --silent) (No console output)
  2. -c (or --config) <directory> (Configuration file location)
  3. -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:

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

Contributors

j-m
j-m
jmsv
jmsv