任何人都可以告诉我如何通过一个命令OS Windows 10删除Cordova应用程序的所有插件。
答案 0 :(得分:0)
我会尝试使用这样的Cordova钩子脚本:
#!/usr/bin/env node
//this hook removes all your plugins
// add your plugins to this list--either
// the identifier, the filesystem location
// or the URL
var pluginlist = [
"org.apache.cordova.device",
"org.apache.cordova.device-motion",
"org.apache.cordova.device-orientation",
"org.apache.cordova.geolocation",
"https://github.com/chrisekelley/AppPreferences/"
];
var fs = require('fs');
var path = require('path');
var sys = require('sys')
var exec = require('child_process').exec;
function puts(error, stdout, stderr) {
sys.puts(stdout)
}
pluginlist.forEach(function(plug) {
exec("cordova plugin rm " + plug, puts);
});
取自@devgirlFL blog。