From 4c4127665fdfaab60ce73f97e7cb2acd92aa28f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Tue, 16 Apr 2019 14:31:15 +0900 Subject: [PATCH] fix: replace requireCordovaModule with require for Cordova 9 --- hooks/windows/check-arch.js | 6 +++--- package.json | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hooks/windows/check-arch.js b/hooks/windows/check-arch.js index 3ae6660a..ec4295d9 100644 --- a/hooks/windows/check-arch.js +++ b/hooks/windows/check-arch.js @@ -2,8 +2,8 @@ module.exports = function(ctx) { if (ctx.opts && ctx.opts.platforms && ctx.opts.platforms.indexOf('windows') > -1 && ctx.opts.options) { var path = require('path'); - var shell = ctx.requireCordovaModule('shelljs'); - var nopt = ctx.requireCordovaModule('nopt'); + var shell = require('shelljs'); + var nopt = require('nopt'); // parse and validate args var args = nopt({ @@ -18,7 +18,7 @@ module.exports = function(ctx) { 'buildConfig': String }, {}, ctx.opts.options.argv, 0); - // Check if --appx flag is passed so that we have a project build version override: + // Check if --appx flag is passed so that we have a project build version override: var isWin10 = args.appx && args.appx.toLowerCase() === 'uap'; // Else check "windows-target-version" preference: diff --git a/package.json b/package.json index ba61b130..688b2935 100644 --- a/package.json +++ b/package.json @@ -54,5 +54,9 @@ "devDependencies": { "jasmine-node": "1.14.5", "pluginpub": "^0.0.9" + }, + "dependencies": { + "nopt": "^4.0.1", + "shelljs": "^0.8.3" } }