cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject [29/32] git commit: CB-5715 For CLI, hide assets/www and res/xml/config.xml by default
Date Mon, 03 Feb 2014 20:26:30 GMT
CB-5715 For CLI, hide assets/www and res/xml/config.xml by default

Add a helper file under assets to say how to re-show the hidden files.
Move the config.xml, www, merges entries to the root to be more discoverable.


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/6c09caa7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/6c09caa7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/6c09caa7

Branch: refs/heads/3.4.x
Commit: 6c09caa793cd8e5bec5431dd8677081dda96b08f
Parents: 760ce9a
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Tue Jan 28 00:28:42 2014 -0500
Committer: Archana Naik <naika@lab126.com>
Committed: Mon Feb 3 11:09:46 2014 -0800

----------------------------------------------------------------------
 bin/lib/create.js                         | 12 ++++++--
 bin/templates/project/eclipse-project-CLI | 42 ++++++++++++++------------
 2 files changed, 32 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/6c09caa7/bin/lib/create.js
----------------------------------------------------------------------
diff --git a/bin/lib/create.js b/bin/lib/create.js
index 1b62bd8..f4d5da2 100755
--- a/bin/lib/create.js
+++ b/bin/lib/create.js
@@ -157,18 +157,24 @@ exports.createProject = function(project_path, package_name, project_name,
proje
             // copy project template
             shell.cp('-r', path.join(project_template_dir, 'assets'), project_path);
             shell.cp('-r', path.join(project_template_dir, 'res'), project_path);
+            shell.cp('-r', path.join(ROOT, 'framework', 'res', 'xml'), path.join(project_path,
'res'));
+
             // Manually create directories that would be empty within the template (since
git doesn't track directories).
             shell.mkdir(path.join(project_path, 'libs'));
+
             // Add in the proper eclipse project file.
             if (use_cli_template) {
+                var note = 'To show `assets/www` or `res/xml/config.xml`, go to:\n' +
+                           '    Project -> Properties -> Resource -> Resource Filters\n'
+
+                           'And delete the exclusion filter.\n';
                 shell.cp(path.join(project_template_dir, 'eclipse-project-CLI'), path.join(project_path,
'.project'));
+                fs.writeFileSync(path.join(project_path, 'assets', '_where-is-www.txt'),
note);
             } else {
                 shell.cp(path.join(project_template_dir, 'eclipse-project'), path.join(project_path,
'.project'));
             }
 
-            // copy cordova.js, cordova.jar and res/xml
-            shell.cp('-r', path.join(ROOT, 'framework', 'res', 'xml'), path.join(project_path,
'res'));
-            copyJsAndJar(project_path, VERSION);
+            // copy cordova.js, cordova.jar
+            copyJsAndLibrary(project_path, use_shared_project, safe_activity_name);
 
             // interpolate the activity name and package
             shell.mkdir('-p', activity_dir);

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/6c09caa7/bin/templates/project/eclipse-project-CLI
----------------------------------------------------------------------
diff --git a/bin/templates/project/eclipse-project-CLI b/bin/templates/project/eclipse-project-CLI
index 7e438bf..581b3ab 100644
--- a/bin/templates/project/eclipse-project-CLI
+++ b/bin/templates/project/eclipse-project-CLI
@@ -32,36 +32,40 @@
 	</natures>
 	<linkedResources>
 		<link>
-			<name>-- Cordova Project --</name>
-			<type>2</type>
-			<locationURI>virtual:/virtual</locationURI>
-		</link>
-		<link>
-                        <name>-- Cordova Project --/config.xml</name>
+                        <name>config.xml</name>
 			<type>1</type>
 			<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/config.xml</locationURI>
 		</link>
                 <link>
-                        <name>-- Cordova Project --/www</name>
+                        <name>www</name>
                         <type>2</type>
 			<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/www</locationURI>
                 </link>
                 <link>
-                        <name>-- Cordova Project --/merges</name>
+                        <name>merges</name>
                         <type>2</type>
 			<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/merges</locationURI>
                 </link>
 	</linkedResources>
-	<filteredResources>
-		<filter>
-			<id>1388696068187</id>
-			<name></name>
-			<type>10</type>
-			<matcher>
-				<id>org.eclipse.ui.ide.multiFilter</id>
-				<arguments>1.0-name-matches-false-true-CordovaLib|platform_www|cordova</arguments>
-			</matcher>
-		</filter>
-	</filteredResources>
+        <filteredResources>
+                <filter>
+                        <id>1390880034107</id>
+                        <name></name>
+                        <type>30</type>
+                        <matcher>
+                                <id>org.eclipse.ui.ide.multiFilter</id>
+                                <arguments>1.0-projectRelativePath-matches-false-true-^(build.xml|ant-gen|ant-build|custom_rules.xml|CordovaLib|platform_www|cordova)</arguments>
+                        </matcher>
+                </filter>
+                <filter>
+                        <id>1390880034108</id>
+                        <name></name>
+                        <type>30</type>
+                        <matcher>
+                                <id>org.eclipse.ui.ide.multiFilter</id>
+                                <arguments>1.0-projectRelativePath-matches-false-true-^(assets/www|res/xml/config.xml)</arguments>
+                        </matcher>
+                </filter>
+        </filteredResources>
 </projectDescription>
 


Mime
View raw message