如何使用gulp有条件地安装基于平台的插件?

时间:2016-04-07 07:14:37

标签: gulp

我想安装一个仅适用于Android而不适用于ios平台的插件。我想用gulp来做,所以我为它创建了一个gulp任务并使用了platformify()。filter([“android”])。以下是我的代码片段,但它对我不起作用.Plugin被添加到两个平台。不确定我是否已正确实施。所以任何帮助都将不胜感激。

gulp.task('InstallImageResizerPlugin',function(){
     platformify().filter(["android"],sh.exec('cordova plugin add https://github.com/wymsee/cordova-imageResizer', {async: true},     function(code, output){}));

0 个答案:

没有答案