var gulp = require("gulp");
var gulpPostCss = require('gulp-postcss');
var doiuse = require('doiuse');
gulp.task("doiuse", function () {
gulp.src("./css/**/*.css")
.pipe(gulpPostCss([
doiuse({
browsers: [
'ie >= 8',
'> 1%'
],
onFeatureUsage: function (usageInfo) {
console.log(usageInfo.message);
}
})
]));
});
And when i run it i have the following result:
events.js:141
throw er; // Unhandled 'error' event
^
TypeError: css.prevMap.consumer is not a function
at __MY_DIR__\node_modules\doiuse\lib\doiuse.js:38:30
at Detector.decl (__MY_DIR__\node_modules\doiuse\lib\detect-feature-use.js:61:13)
at __MY_DIR__\node_modules\doiuse\lib\detect-feature-use.js:103:18
at Rule.each (__MY_DIR__\node_modules\gulp-postcss\node_modules\postcss\lib\container.js:59:22)
at Detector.process (__MY_DIR__\node_modules\doiuse\lib\detect-feature-use.js:97:12)
at Detector.rule (__MY_DIR__\node_modules\doiuse\lib\detect-feature-use.js:76:12)
at __MY_DIR__\node_modules\doiuse\lib\detect-feature-use.js:100:18
at Root.each (__MY_DIR__\node_modules\gulp-postcss\node_modules\postcss\lib\container.js:59:22)
at Detector.process (__MY_DIR__\node_modules\doiuse\lib\detect-feature-use.js:97:12)
at postcss (__MY_DIR__\node_modules\doiuse\lib\doiuse.js:32:23)
Process finished with exit code 1
I have defined the following task:
And when i run it i have the following result:
Software versions: