anandthakker / anandthakker/doiuse

Feature: Ignore partial support

オープン
#55 コメント 6 件 リアクション 4 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
1.3k
フォーク
57
PR マージ指標
30日以内にマージされた PR はありません

説明

In my use of `doiuse` for [Foundation](https://github.com/zurb/foundation-sites), I have a lot of properties that are _partially_ supported.

The most common are:
- `rem` and `transition` by IE9/10
- `box-shadow` and `background-image` options by Android Browser 2.3/3

Currently, there is so much _partial support_ errors that the _most important_ errors can be easily forgotten.

I don't need to have a full support of these old browsers, so the errors that must be shown are only the unsupported properties for these browsers, and the unsupported or partially supported properties for the newer browsers. I think it would be very useful to be able to ignore all partial support errors, or for a specific list of browsers.

For example, with gulp:
```node
var gulp = require('gulp');
var postcss = require('gulp-postcss');
var doiuse = require('doiuse');

var COMPATIBILITY = [
'last 2 versions',
'ie >= 9',
'Android >= 2.3',
'ios >= 7'
];

var FULL_COMPATIBILITY = [
'last 2 versions',
'ie >= 10',
'Android >= 4.0',
'ios >= 7'
];

gulp.task('doiuse', function() {
return gulp.src(['_build/assets/css/foundation.css'])
.pipe(postcss([doiuse({
browsers: COMPATIBILITY,
partialSupport: true,
partialSupportBrowsers: FULL_COMPATIBILITY,
onFeatureUsage: function (usageInfo) {
console.log(usageInfo.message)
}
})]))
});
```

Options:
- browsers (default: `{}`): list of browsers used to search for unsupported features.
- partialSupport (default: `true`): check for partially supported features.
- partialSupportBrowsers (default: `browsers`): list of browsers used to search for partially supported features.

What do you think ?

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。