cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From an-s...@apache.org
Subject cordova-windows git commit: CB-11241 Return adding BOM to www back to prepare
Date Thu, 21 Jul 2016 09:33:42 GMT
Repository: cordova-windows
Updated Branches:
  refs/heads/master dfde5cd91 -> 58080c4c4


CB-11241 Return adding BOM to www back to prepare


Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/58080c4c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/58080c4c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/58080c4c

Branch: refs/heads/master
Commit: 58080c4c48f6496dc21fa7b9ae85c189f8eeb1d9
Parents: dfde5cd
Author: Vladimir Kotikov <v-vlkoti@microsoft.com>
Authored: Tue Jul 19 10:02:54 2016 +0300
Committer: Vladimir Kotikov <v-vlkoti@microsoft.com>
Committed: Thu Jul 21 12:32:36 2016 +0300

----------------------------------------------------------------------
 spec/unit/build.spec.js         | 1 -
 template/cordova/lib/build.js   | 4 ----
 template/cordova/lib/prepare.js | 7 ++++---
 3 files changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58080c4c/spec/unit/build.spec.js
----------------------------------------------------------------------
diff --git a/spec/unit/build.spec.js b/spec/unit/build.spec.js
index 396baa2..dc48356 100644
--- a/spec/unit/build.spec.js
+++ b/spec/unit/build.spec.js
@@ -88,7 +88,6 @@ describe('run method', function() {
 
         spyOn(utils, 'isCordovaProject').andReturn(true);
         spyOn(prepare, 'applyPlatformConfig');
-        spyOn(prepare, 'addBOMSignature');
         spyOn(prepare, 'updateBuildConfig');
         spyOn(package, 'getPackage').andReturn(Q({}));
 

http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58080c4c/template/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/template/cordova/lib/build.js b/template/cordova/lib/build.js
index b69afa5..84dedd8 100644
--- a/template/cordova/lib/build.js
+++ b/template/cordova/lib/build.js
@@ -49,7 +49,6 @@ var ROOT = path.resolve(__dirname, '../..');
 // See 'help' function for args list
 module.exports.run = function run (buildOptions) {
 
-    var that = this;
     ROOT = this.root || ROOT;
 
     if (!utils.isCordovaProject(this.root)){
@@ -78,9 +77,6 @@ module.exports.run = function run (buildOptions) {
     .then(function(msbuildTools) {
         // Apply build related configs
         prepare.updateBuildConfig(buildConfig);
-        // CB-5421 Add BOM to all html, js, css files
-        // to ensure app can pass Windows Store Certification
-        prepare.addBOMSignature(that.locations.www);
 
         if (buildConfig.publisherId) {
             updateManifestWithPublisher(msbuildTools, buildConfig);

http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58080c4c/template/cordova/lib/prepare.js
----------------------------------------------------------------------
diff --git a/template/cordova/lib/prepare.js b/template/cordova/lib/prepare.js
index 2a3b676..2d3a9c9 100644
--- a/template/cordova/lib/prepare.js
+++ b/template/cordova/lib/prepare.js
@@ -458,6 +458,9 @@ module.exports.prepare = function (cordovaProject, options) {
     })
     .then(function () {
         copyImages(cordovaProject, self.locations);
+        // CB-5421 Add BOM to all html, js, css files
+        // to ensure app can pass Windows Store Certification
+        addBOMSignature(self.locations.www);
     })
     .then(function () {
         events.emit('verbose', 'Prepared windows project successfully');
@@ -495,7 +498,7 @@ module.exports.clean = function (options) {
 function addBOMSignature(directory) {
     shell.ls('-R', directory)
     .forEach(function (file) {
-        if (!file.match(/\.(js|html|css|json)$/i)) {
+        if (!file.match(/\.(js|htm|html|css|json)$/i)) {
             return;
         }
 
@@ -512,8 +515,6 @@ function addBOMSignature(directory) {
     });
 }
 
-module.exports.addBOMSignature = addBOMSignature;
-
 /**
  * Updates config files in project based on app's config.xml and config munge,
  *   generated by plugins.


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


Mime
View raw message