Skip to content

Commit

Permalink
Fixes requireCordovaModule on cordova 9 tkyaji#85 tkyaji#78
Browse files Browse the repository at this point in the history
  • Loading branch information
weareu committed Feb 1, 2022
1 parent ddee9df commit 3e346d2
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions hooks/after_prepare.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
module.exports = function(context) {

var path = context.requireCordovaModule('path'),
fs = context.requireCordovaModule('fs'),
crypto = context.requireCordovaModule('crypto'),
Q = context.requireCordovaModule('q'),
var path = require('path'),
fs = require('fs'),
crypto = require('crypto'),
Q = require('q'),
cordova_util = context.requireCordovaModule('cordova-lib/src/cordova/util'),
platforms = context.requireCordovaModule('cordova-lib/src/platforms/platforms'),
Parser = context.requireCordovaModule('cordova-lib/src/cordova/metadata/parser'),
ParserHelper = context.requireCordovaModule('cordova-lib/src/cordova/metadata/parserhelper/ParserHelper'),
ConfigParser = context.requireCordovaModule('cordova-common').ConfigParser;

var deferral = new Q.defer();
Expand Down Expand Up @@ -166,4 +163,4 @@ module.exports = function(context) {

fs.writeFileSync(sourceFile, content, 'utf-8');
}
}
}

0 comments on commit 3e346d2

Please sign in to comment.