From f951b190d1d2e0059e559078aa17f9510318b0a3 Mon Sep 17 00:00:00 2001 From: gerard-payne Date: Thu, 25 Apr 2019 13:32:51 +0200 Subject: [PATCH] updated context.requireCordovaModule to require for non-cordova modules --- hooks/after_build/000-build_64_bit.js | 2 +- hooks/after_plugin_install/000-shared_mode_special.js | 2 +- hooks/before_build/000-build_64_bit.js | 2 +- hooks/before_plugin_uninstall/000-shared_mode_special.js | 2 +- hooks/update_config.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hooks/after_build/000-build_64_bit.js b/hooks/after_build/000-build_64_bit.js index 4083ecc..cb9eec0 100644 --- a/hooks/after_build/000-build_64_bit.js +++ b/hooks/after_build/000-build_64_bit.js @@ -3,7 +3,7 @@ module.exports = function(context) { /** @external */ - var deferral = context.requireCordovaModule('q').defer(), + var deferral = require('q').defer(), UpdateConfig = require('./../update_config.js'), updateConfig = new UpdateConfig(context); diff --git a/hooks/after_plugin_install/000-shared_mode_special.js b/hooks/after_plugin_install/000-shared_mode_special.js index d0a33ca..83d6196 100644 --- a/hooks/after_plugin_install/000-shared_mode_special.js +++ b/hooks/after_plugin_install/000-shared_mode_special.js @@ -3,7 +3,7 @@ module.exports = function(context) { /** @external */ - var deferral = context.requireCordovaModule('q').defer(), + var deferral = require('q').defer(), UpdateConfig = require('./../update_config.js'), updateConfig = new UpdateConfig(context); diff --git a/hooks/before_build/000-build_64_bit.js b/hooks/before_build/000-build_64_bit.js index 7c6fef7..82979f5 100644 --- a/hooks/before_build/000-build_64_bit.js +++ b/hooks/before_build/000-build_64_bit.js @@ -3,7 +3,7 @@ module.exports = function(context) { /** @external */ - var deferral = context.requireCordovaModule('q').defer(), + var deferral = require('q').defer(), UpdateConfig = require('./../update_config.js'), updateConfig = new UpdateConfig(context); diff --git a/hooks/before_plugin_uninstall/000-shared_mode_special.js b/hooks/before_plugin_uninstall/000-shared_mode_special.js index 19909b8..407d748 100644 --- a/hooks/before_plugin_uninstall/000-shared_mode_special.js +++ b/hooks/before_plugin_uninstall/000-shared_mode_special.js @@ -3,7 +3,7 @@ module.exports = function(context) { /** @external */ - var deferral = context.requireCordovaModule('q').defer(), + var deferral = require('q').defer(), UpdateConfig = require('./../update_config.js'), updateConfig = new UpdateConfig(context); diff --git a/hooks/update_config.js b/hooks/update_config.js index 1f70dcc..c8c7603 100644 --- a/hooks/update_config.js +++ b/hooks/update_config.js @@ -13,7 +13,7 @@ module.exports = function(context) { } /** @external */ - var fs = context.requireCordovaModule('fs'), + var fs = require('fs'), path = context.requireCordovaModule('path'), et = context.requireCordovaModule('elementtree');