You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2013/07/16 02:33:37 UTC
[1/3] git commit: [windowsphone] csproj update for Content references
Updated Branches:
refs/heads/plugman-registry 8c0dbf737 -> 8dd5a1b7c
[windowsphone] csproj update for Content references
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/2c284820
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/2c284820
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/2c284820
Branch: refs/heads/plugman-registry
Commit: 2c284820bb9ff1ef651eee8affd84f83dd23e489
Parents: 24e452a
Author: Benn Mapes <be...@gmail.com>
Authored: Mon Jul 15 17:19:13 2013 -0700
Committer: Benn Mapes <be...@gmail.com>
Committed: Mon Jul 15 17:19:13 2013 -0700
----------------------------------------------------------------------
src/util/csproj.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/2c284820/src/util/csproj.js
----------------------------------------------------------------------
diff --git a/src/util/csproj.js b/src/util/csproj.js
index 475a5d6..d3b9180 100644
--- a/src/util/csproj.js
+++ b/src/util/csproj.js
@@ -70,14 +70,14 @@ csproj.prototype = {
var item_groups = this.xml.findall('ItemGroup');
for (var i = 0, l = item_groups.length; i < l; i++) {
var group = item_groups[i];
- var files = group.findall('Compile').concat(group.findall('Page'));
+ var files = group.findall('Compile').concat(group.findall('Page')).concat(group.findall('Content'));
for (var j = 0, k = files.length; j < k; j++) {
var file = files[j];
if (file.attrib.Include == relative_path) {
// remove file reference
group.remove(0, file);
// remove ItemGroup if empty
- var new_group = group.findall('Compile').concat(group.findall('Page'));
+ var new_group = group.findall('Compile').concat(group.findall('Page')).concat(group.findall('Content'));
if(new_group.length < 1) {
this.xml.getroot().remove(0, group);
}
[3/3] git commit: Merge branch 'master' into plugman-registry
Posted by an...@apache.org.
Merge branch 'master' into plugman-registry
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/8dd5a1b7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/8dd5a1b7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/8dd5a1b7
Branch: refs/heads/plugman-registry
Commit: 8dd5a1b7c14774b939928f03f4875e24f7f26718
Parents: 8c0dbf7 9c0d637
Author: Anis Kadri <an...@apache.org>
Authored: Mon Jul 15 17:33:30 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Mon Jul 15 17:33:30 2013 -0700
----------------------------------------------------------------------
spec/util/csproj.spec.js | 9 +++++++++
src/util/csproj.js | 4 ++--
2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[2/3] git commit: added tests for adding/removing Conent refereces to
csproj file
Posted by an...@apache.org.
added tests for adding/removing Conent refereces to csproj file
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/9c0d6374
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/9c0d6374
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/9c0d6374
Branch: refs/heads/plugman-registry
Commit: 9c0d63742f665dd51390345acbaa1d08c35b60fe
Parents: 2c28482
Author: Benn Mapes <be...@gmail.com>
Authored: Mon Jul 15 17:24:53 2013 -0700
Committer: Benn Mapes <be...@gmail.com>
Committed: Mon Jul 15 17:24:53 2013 -0700
----------------------------------------------------------------------
spec/util/csproj.spec.js | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/9c0d6374/spec/util/csproj.spec.js
----------------------------------------------------------------------
diff --git a/spec/util/csproj.spec.js b/spec/util/csproj.spec.js
index a75b68b..7228f15 100644
--- a/spec/util/csproj.spec.js
+++ b/spec/util/csproj.spec.js
@@ -34,6 +34,7 @@ describe('csproj', function() {
var page_test_cs = path.join('src', 'UI', 'PageTest.xaml.cs');
var lib_test = path.join('lib', 'LibraryTest.dll');
var file_test = path.join('src', 'FileTest.cs');
+ var content_test = path.join('src', 'Content.img');
describe('add method', function() {
@@ -57,6 +58,10 @@ describe('csproj', function() {
test_csproj.addSourceFile(file_test);
expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\FileTest.cs"]')).toBeTruthy();
});
+ it('should properly add content files', function() {
+ test_csproj.addSourceFile(content_test);
+ expect(test_csproj.xml.getroot().find('.//Content[@Include="src\\Content.img"]')).toBeTruthy();
+ });
});
@@ -78,6 +83,10 @@ describe('csproj', function() {
test_csproj.removeSourceFile(file_test);
expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\FileTest.cs"]')).toBeFalsy();
});
+ it('should properly remove content files', function() {
+ test_csproj.removeSourceFile(content_test);
+ expect(test_csproj.xml.getroot().find('.//Content[@Include="src\\Content.img"]')).toBeFalsy();
+ });
it('should remove all empty ItemGroup\'s', function() {
test_csproj.removeSourceFile(page_test);
test_csproj.removeSourceFile(page_test_cs);