Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
androidApp () {
const PlatformApi = require('cordova-android');
const appPath = path.join(fixturesBaseDir, 'android-app');
// We need to provide a ConfigParser instance to createPlatform :(
const cfgXmlPath = require.resolve('cordova-android/bin/templates/project/res/xml/config.xml');
const config = new ConfigParser(cfgXmlPath);
// Create the app folder and return its path
return PlatformApi.createPlatform(appPath, config, null, events)
// Make our node_modules accessible from the app dir to make
// platform modules work when they are required from the app dir.
.then(_ => linkToGlobalModulesFrom(appPath))
.then(_ => appPath);
},