using process.env.CORDOVA_PLATFORMS
, it returns a string including all build platforms targets, separated by a comma.
process.env
contains all information you may need for the build. Dump it for more information.
if you're using module.export
module.exports = function(ctx) {
// make sure android platform is part of build
if (ctx.opts.platforms.indexOf('android') < 0) {
return;
}
};