Windows helper. Removes unnecessary $(MSBuildThisFileDirectory) This property is not required since all main .jsproj and other shared project files are in the same folder
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/a974991b Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/a974991b Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/a974991b Branch: refs/heads/cb-7219 Commit: a974991bcf9392b9bc3917a60b4d39d14c8be4de Parents: 55d4a68 Author: sgrebnov <[email protected]> Authored: Thu Aug 28 16:48:24 2014 +0400 Committer: Anis Kadri <[email protected]> Committed: Fri Sep 5 11:12:19 2014 -0700 ---------------------------------------------------------------------- cordova-lib/src/util/windows/jsproj.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/a974991b/cordova-lib/src/util/windows/jsproj.js ---------------------------------------------------------------------- diff --git a/cordova-lib/src/util/windows/jsproj.js b/cordova-lib/src/util/windows/jsproj.js index a20fe7f..ef1cb38 100644 --- a/cordova-lib/src/util/windows/jsproj.js +++ b/cordova-lib/src/util/windows/jsproj.js @@ -82,8 +82,6 @@ jsproj.prototype = { events.emit('verbose','addReference::' + relPath); - relPath = this.isUniversalWindowsApp ? '$(MSBuildThisFileDirectory)' + relPath : relPath; - var item = new et.Element('ItemGroup'); var extName = path.extname(relPath); @@ -110,8 +108,6 @@ jsproj.prototype = { removeReference:function(relPath) { events.emit('verbose','removeReference::' + relPath); - relPath = this.isUniversalWindowsApp ? '$(MSBuildThisFileDirectory)' + relPath : relPath; - var extName = path.extname(relPath); var includeText = path.basename(relPath,extName); // <ItemGroup> @@ -131,10 +127,9 @@ jsproj.prototype = { } // make ItemGroup to hold file. var item = new et.Element('ItemGroup'); - var me = this; + relative_path.forEach(function(filePath) { filePath = filePath.split('/').join('\\'); - filePath = me.isUniversalWindowsApp ? '$(MSBuildThisFileDirectory)' + filePath : filePath; var content = new et.Element('Content'); content.attrib.Include = filePath; @@ -148,7 +143,6 @@ jsproj.prototype = { if (!isRegexp) { // path.normalize(relative_path);// ?? relative_path = relative_path.split('/').join('\\'); - relative_path = this.isUniversalWindowsApp ? '$(MSBuildThisFileDirectory)' + relative_path : relative_path; } var root = this.xml.getroot();
