gem 'trufflepig', :require => 'trufflepig'
Send the truffle pig on its way:
search = Trufflepig::Search.new "path/to/file/or/directory" search.perform
Then look what it found:
The results will consist of an array of feature objects, formatted exactly like the caniuse.com/html5please.com source data, containing a description of the feature as well as browser compatibility tables, and links to more info.
Adding or updating detection patterns
Add or update patterns with the correct caniuse.com key to data/patterns.json. The build task will merge that list with the source JSON and create data/features.json which will be used by the search:
- Respect filetypes when scanning for features (e.g. don't look for CSS features in HTML code)
- Command line interface
We love pull requests. If you want to submit a patch:
- Fork the project.
- Make your feature addition or bug fix.
- Write specs for it. This is important so nobody breaks it in a future version unintentionally.
- Push to your fork and send a pull request.