You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2018/02/14 19:28:18 UTC

[cordova-windows] 08/11: move method

This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch janpio-msbuild_cleanup
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git

commit 3d8bceed41bde9c4e968106ad565ea454d10cd27
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Wed Feb 14 19:30:31 2018 +0100

    move method
---
 template/cordova/lib/MSBuildTools.js | 51 ++++++++++++++++++------------------
 1 file changed, 26 insertions(+), 25 deletions(-)

diff --git a/template/cordova/lib/MSBuildTools.js b/template/cordova/lib/MSBuildTools.js
index 5d9fe2c..43dcf25 100644
--- a/template/cordova/lib/MSBuildTools.js
+++ b/template/cordova/lib/MSBuildTools.js
@@ -184,31 +184,6 @@ function checkMSBuildVersion (version) {
         });
 }
 
-// returns an array of available UAP Versions
-// prepare.js
-module.exports.getAvailableUAPVersions = function () {
-    var programFilesFolder = process.env['ProgramFiles(x86)'] || process.env['ProgramFiles'];
-    // No Program Files folder found, so we won't be able to find UAP SDK
-    if (!programFilesFolder) return [];
-
-    var uapFolderPath = path.join(programFilesFolder, 'Windows Kits', '10', 'Platforms', 'UAP');
-    if (!shell.test('-e', uapFolderPath)) {
-        return []; // No UAP SDK exists on this machine
-    }
-
-    var result = [];
-    shell.ls(uapFolderPath).filter(function (uapDir) {
-        return shell.test('-d', path.join(uapFolderPath, uapDir));
-    }).map(function (folder) {
-        return Version.tryParse(folder);
-    }).forEach(function (version, index) {
-        if (version) {
-            result.push(version);
-        }
-    });
-
-    return result;
-};
 
 // gets the latest MSBuild version from a list of versions
 module.exports.getLatestMSBuild = function () {
@@ -354,3 +329,29 @@ module.exports.getWillowInstallations = function () {
     });
     return installations;
 };
+
+// returns an array of available UAP Versions
+// prepare.js
+module.exports.getAvailableUAPVersions = function () {
+    var programFilesFolder = process.env['ProgramFiles(x86)'] || process.env['ProgramFiles'];
+    // No Program Files folder found, so we won't be able to find UAP SDK
+    if (!programFilesFolder) return [];
+
+    var uapFolderPath = path.join(programFilesFolder, 'Windows Kits', '10', 'Platforms', 'UAP');
+    if (!shell.test('-e', uapFolderPath)) {
+        return []; // No UAP SDK exists on this machine
+    }
+
+    var result = [];
+    shell.ls(uapFolderPath).filter(function (uapDir) {
+        return shell.test('-d', path.join(uapFolderPath, uapDir));
+    }).map(function (folder) {
+        return Version.tryParse(folder);
+    }).forEach(function (version, index) {
+        if (version) {
+            result.push(version);
+        }
+    });
+
+    return result;
+};
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
janpio@apache.org.

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org