You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2016/08/26 00:10:25 UTC

[1/6] cordova-template-reference git commit: Initial commit

Repository: cordova-template-reference
Updated Branches:
  refs/heads/master [created] 97081b674


Initial commit

Project: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/commit/7dc751c0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/tree/7dc751c0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/diff/7dc751c0

Branch: refs/heads/master
Commit: 7dc751c01ce6f059738fef775a237f6d280a9349
Parents: 
Author: Caryn Tran <ca...@berkeley.edu>
Authored: Thu Jun 16 14:30:48 2016 -0700
Committer: Caryn Tran <ca...@berkeley.edu>
Committed: Thu Jun 16 14:30:48 2016 -0700

----------------------------------------------------------------------
 LICENSE | 201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 201 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/7dc751c0/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..8dada3e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.


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


[3/6] cordova-template-reference git commit: Update package.json

Posted by st...@apache.org.
Update package.json

Project: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/commit/b2a185b6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/tree/b2a185b6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/diff/b2a185b6

Branch: refs/heads/master
Commit: b2a185b6a125d05418e0d05f152d838d65f391ce
Parents: c06ce27
Author: Caryn Tran <ca...@berkeley.edu>
Authored: Tue Jun 28 15:12:24 2016 -0700
Committer: GitHub <no...@github.com>
Committed: Tue Jun 28 15:12:24 2016 -0700

----------------------------------------------------------------------
 template_src/package.json | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/b2a185b6/template_src/package.json
----------------------------------------------------------------------
diff --git a/template_src/package.json b/template_src/package.json
index ec9ce79..0395e0e 100644
--- a/template_src/package.json
+++ b/template_src/package.json
@@ -1,5 +1,5 @@
 {
-  "name": "template_project",
+  "name": "TemplateProject",
   "version": "1.0.0",
   "description": "This is the project created from the template: cordova_template",
   "scripts": {
@@ -8,6 +8,5 @@
   "keywords": [
     "ecosystem:cordova"
   ],
-  "author": "",
   "license": "ISC"
 }


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


[2/6] cordova-template-reference git commit: Made a reference for template creation

Posted by st...@apache.org.
Made a reference for template creation


Project: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/commit/c06ce270
Tree: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/tree/c06ce270
Diff: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/diff/c06ce270

Branch: refs/heads/master
Commit: c06ce2708f9e5a3a1ce1933203dd0256598b3c66
Parents: 7dc751c
Author: carynbear <ca...@berkeley.edu>
Authored: Thu Jun 16 14:28:18 2016 -0700
Committer: carynbear <ca...@berkeley.edu>
Committed: Thu Jun 16 15:15:03 2016 -0700

----------------------------------------------------------------------
 README.md                      |  39 ++++++++++++
 index.js                       |   5 ++
 package.json                   |  20 +++++++
 template_docs.md               |  41 +++++++++++++
 template_src/config.xml        |  26 ++++++++
 template_src/hooks/README.md   |  23 ++++++++
 template_src/package.json      |  13 ++++
 template_src/www/css/index.css | 115 ++++++++++++++++++++++++++++++++++++
 template_src/www/img/logo.png  | Bin 0 -> 21814 bytes
 template_src/www/index.html    |  49 +++++++++++++++
 template_src/www/js/index.js   |  51 ++++++++++++++++
 11 files changed, 382 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/c06ce270/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a860b68
--- /dev/null
+++ b/README.md
@@ -0,0 +1,39 @@
+# Cordova Template Reference
+This is a reference for building and publishing Cordova Templates.
+
+## Structure of your template
+```
+template_package
+\u251c\u2500\u2500 package.json (for your template package to be published on npm)
+\u251c\u2500\u2500	index.js
+\u2514\u2500\u2500 template_src (contains template files)
+    \u251c\u2500\u2500 package.json 
+	\u251c\u2500\u2500 config.xml 
+	\u2514\u2500\u2500 (files and folders that make up the template)
+```
+### Outside of `template_src`
+All files outside of `template_src` are used to define parameters about the template. These files are not copied over at creation, so feel free to add a README or any other files outside  of template_src.
+
+`index.js` points to where the template exists. You'll see that index.js usually looks like:
+```javascript
+var path = require('path');
+
+module.export = {
+    dirname = path.join(__dirname, 'template_src')
+};
+```
+
+`package.json` tells you about the template. It is necessary state that `"main": "index.js"` so that the reference to the template source in `index.js` is propagated. All templates should contain the keyword `"cordova:template"` so that the template is searchable on npm.
+```javascript
+...
+"main": "index.js",
+...
+"keywords": [
+"cordova:template"
+...
+```
+
+### Inside of `template_src`
+All files inside of `template_src` compose the template from which a user would desire in order to create their project. Everything in this folder is copied over to the created project.
+
+(The package.json in `template_src` should be filled with information that describes the project that would be created from the template.)

http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/c06ce270/index.js
----------------------------------------------------------------------
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..8464292
--- /dev/null
+++ b/index.js
@@ -0,0 +1,5 @@
+var path = require('path');
+
+module.export = {
+    dirname = path.join(__dirname, 'template_src')
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/c06ce270/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..990a95c
--- /dev/null
+++ b/package.json
@@ -0,0 +1,20 @@
+{
+  "name": "cordova_template",
+  "version": "1.0.0",
+  "description": "A reference for creating cordova app templates.",
+  "main": "index.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/carynbear/cordova-template.git"
+  },
+  "homepage": "https://github.com/carynbear/cordova-template",
+  "keywords": [
+    "ecosystem:cordova",
+    "cordova:template"
+  ],
+  "author": "Caryn Tran",
+  "license": "Apache-2.0"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/c06ce270/template_docs.md
----------------------------------------------------------------------
diff --git a/template_docs.md b/template_docs.md
new file mode 100644
index 0000000..ba5cde2
--- /dev/null
+++ b/template_docs.md
@@ -0,0 +1,41 @@
+#Use a Template
+
+Templates allow you to use preexisting code to jumpstart your project. 
+
+Find a template to create your app from by seaching for the keyword `cordova:template` on [npm](https://www.npmjs.com/search?q=cordova%3Atemplate). You can also use local templates on your computer, or a Git repository.
+
+After locating a template you wish to use. Create your project using that template, by specifying the `--template` flag during the `create` command, followed by your template source.
+
+Creating a cordova project from a template
+```
+$ cordova create hello com.example.hello HelloWorld --template <npm-package-name | <git-remote-url | local-path>
+```
+
+After succesfully using a template to create your project, you'll want to indicate the platforms that you intend to target with your app. Go into your project folder and [add platforms](http://cordova.apache.org/docs/en/latest/guide/cli/index.html#add-platforms).
+
+#Create a Template
+
+Begin by creating a cordova app that will become the basis for your template. Then you'll take the contents of your app and put them into the following structure. When your template is used, all of the contents within `template_src` will be used to create the new project, so be sure to include any necessary files in that folder. Reference [this example](https://github.com/carynbear/cordova-template) for details.
+
+```
+template_package/
+\u251c\u2500\u2500 package.json   	(optional; needed to publish template on npm)
+\u251c\u2500\u2500	index.js 		(required)
+\u2514\u2500\u2500 template_src/ 	(required)
+	\u2514\u2500\u2500 CONTENTS OF APP TEMPLATE
+```
+Note that `index.js` should export a reference to `template_src` and `package.json` should reference `index.js`. See [the example](https://github.com/carynbear/cordova-template) for details on how that is done.
+
+To finish off your template, edit `package.json` to contain the keyword `"cordova:template"`.
+```javascript
+{
+  ...
+  "keywords": [
+    "ecosystem:cordova",
+    "cordova:template"
+  ]
+  ...
+}
+```
+
+Congrats! You've made a template for creating a Cordova project. Share your template on npm so that everyone can benefit from your hard work.

http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/c06ce270/template_src/config.xml
----------------------------------------------------------------------
diff --git a/template_src/config.xml b/template_src/config.xml
new file mode 100644
index 0000000..ad359a2
--- /dev/null
+++ b/template_src/config.xml
@@ -0,0 +1,26 @@
+<?xml version='1.0' encoding='utf-8'?>
+<widget id="com.example.template" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+    <name>Template</name>
+    <description>
+        This is the project created from the template: cordova_template.
+    </description>
+    <author email="dev@cordova.apache.org" href="http://cordova.io">
+        Apache Cordova Team
+    </author>
+    <content src="index.html" />
+    <plugin name="cordova-plugin-whitelist" spec="1" />
+    <access origin="*" />
+    <allow-intent href="http://*/*" />
+    <allow-intent href="https://*/*" />
+    <allow-intent href="tel:*" />
+    <allow-intent href="sms:*" />
+    <allow-intent href="mailto:*" />
+    <allow-intent href="geo:*" />
+    <platform name="android">
+        <allow-intent href="market:*" />
+    </platform>
+    <platform name="ios">
+        <allow-intent href="itms:*" />
+        <allow-intent href="itms-apps:*" />
+    </platform>
+</widget>

http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/c06ce270/template_src/hooks/README.md
----------------------------------------------------------------------
diff --git a/template_src/hooks/README.md b/template_src/hooks/README.md
new file mode 100644
index 0000000..574ad4c
--- /dev/null
+++ b/template_src/hooks/README.md
@@ -0,0 +1,23 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+-->
+# Cordova Hooks
+
+Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system  to customize cordova commands. See Hooks Guide for more details:  http://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide.

http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/c06ce270/template_src/package.json
----------------------------------------------------------------------
diff --git a/template_src/package.json b/template_src/package.json
new file mode 100644
index 0000000..ec9ce79
--- /dev/null
+++ b/template_src/package.json
@@ -0,0 +1,13 @@
+{
+  "name": "template_project",
+  "version": "1.0.0",
+  "description": "This is the project created from the template: cordova_template",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "keywords": [
+    "ecosystem:cordova"
+  ],
+  "author": "",
+  "license": "ISC"
+}

http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/c06ce270/template_src/www/css/index.css
----------------------------------------------------------------------
diff --git a/template_src/www/css/index.css b/template_src/www/css/index.css
new file mode 100644
index 0000000..51daa79
--- /dev/null
+++ b/template_src/www/css/index.css
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+* {
+    -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
+}
+
+body {
+    -webkit-touch-callout: none;                /* prevent callout to copy image, etc when tap to hold */
+    -webkit-text-size-adjust: none;             /* prevent webkit from resizing text to fit */
+    -webkit-user-select: none;                  /* prevent copy paste, to allow, change 'none' to 'text' */
+    background-color:#E4E4E4;
+    background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
+    background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
+    background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
+    background-image:-webkit-gradient(
+        linear,
+        left top,
+        left bottom,
+        color-stop(0, #A7A7A7),
+        color-stop(0.51, #E4E4E4)
+    );
+    background-attachment:fixed;
+    font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
+    font-size:12px;
+    height:100%;
+    margin:0px;
+    padding:0px;
+    text-transform:uppercase;
+    width:100%;
+}
+
+/* Portrait layout (default) */
+.app {
+    background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
+    position:absolute;             /* position in the center of the screen */
+    left:50%;
+    top:50%;
+    height:50px;                   /* text area height */
+    width:225px;                   /* text area width */
+    text-align:center;
+    padding:180px 0px 0px 0px;     /* image height is 200px (bottom 20px are overlapped with text) */
+    margin:-115px 0px 0px -112px;  /* offset vertical: half of image height and text area height */
+                                   /* offset horizontal: half of text area width */
+}
+
+/* Landscape layout (with min-width) */
+@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
+    .app {
+        background-position:left center;
+        padding:75px 0px 75px 170px;  /* padding-top + padding-bottom + text area = image height */
+        margin:-90px 0px 0px -198px;  /* offset vertical: half of image height */
+                                      /* offset horizontal: half of image width and text area width */
+    }
+}
+
+h1 {
+    font-size:24px;
+    font-weight:normal;
+    margin:0px;
+    overflow:visible;
+    padding:0px;
+    text-align:center;
+}
+
+.event {
+    border-radius:4px;
+    -webkit-border-radius:4px;
+    color:#FFFFFF;
+    font-size:12px;
+    margin:0px 30px;
+    padding:2px 0px;
+}
+
+.event.listening {
+    background-color:#333333;
+    display:block;
+}
+
+.event.received {
+    background-color:#4B946A;
+    display:none;
+}
+
+@keyframes fade {
+    from { opacity: 1.0; }
+    50% { opacity: 0.4; }
+    to { opacity: 1.0; }
+}
+ 
+@-webkit-keyframes fade {
+    from { opacity: 1.0; }
+    50% { opacity: 0.4; }
+    to { opacity: 1.0; }
+}
+ 
+.blink {
+    animation:fade 3000ms infinite;
+    -webkit-animation:fade 3000ms infinite;
+}

http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/c06ce270/template_src/www/img/logo.png
----------------------------------------------------------------------
diff --git a/template_src/www/img/logo.png b/template_src/www/img/logo.png
new file mode 100644
index 0000000..9519e7d
Binary files /dev/null and b/template_src/www/img/logo.png differ

http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/c06ce270/template_src/www/index.html
----------------------------------------------------------------------
diff --git a/template_src/www/index.html b/template_src/www/index.html
new file mode 100644
index 0000000..24be165
--- /dev/null
+++ b/template_src/www/index.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+     KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<html>
+    <head>
+        <!--
+        Customize this policy to fit your own app's needs. For more guidance, see:
+            https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md#content-security-policy
+        Some notes:
+            * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
+            * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
+            * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
+                * Enable inline JS: add 'unsafe-inline' to default-src
+        -->
+        <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
+        <meta name="format-detection" content="telephone=no">
+        <meta name="msapplication-tap-highlight" content="no">
+        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
+        <link rel="stylesheet" type="text/css" href="css/index.css">
+        <title>A Template</title>
+    </head>
+    <body>
+        <div class="app">
+            <h1>Apache Cordova</h1>
+            <div id="deviceready" class="blink">
+                <p class="event listening">Connecting to Device</p>
+                <p class="event received">Device is Ready</p>
+            </div>
+        </div>
+        <script type="text/javascript" src="cordova.js"></script>
+        <script type="text/javascript" src="js/index.js"></script>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/c06ce270/template_src/www/js/index.js
----------------------------------------------------------------------
diff --git a/template_src/www/js/index.js b/template_src/www/js/index.js
new file mode 100644
index 0000000..c31cd83
--- /dev/null
+++ b/template_src/www/js/index.js
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+var app = {
+    // Application Constructor
+    initialize: function() {
+        this.bindEvents();
+    },
+    // Bind Event Listeners
+    //
+    // Bind any events that are required on startup. Common events are:
+    // 'load', 'deviceready', 'offline', and 'online'.
+    bindEvents: function() {
+        document.addEventListener('deviceready', this.onDeviceReady, false);
+    },
+    // deviceready Event Handler
+    //
+    // The scope of 'this' is the event. In order to call the 'receivedEvent'
+    // function, we must explicitly call 'app.receivedEvent(...);'
+    onDeviceReady: function() {
+        app.receivedEvent('deviceready');
+    },
+    // Update DOM on a Received Event
+    receivedEvent: function(id) {
+        var parentElement = document.getElementById(id);
+        var listeningElement = parentElement.querySelector('.listening');
+        var receivedElement = parentElement.querySelector('.received');
+
+        listeningElement.setAttribute('style', 'display:none;');
+        receivedElement.setAttribute('style', 'display:block;');
+
+        console.log('Received Event: ' + id);
+    }
+};
+
+app.initialize();
\ No newline at end of file


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


[6/6] cordova-template-reference git commit: cordova_template to cordova-template

Posted by st...@apache.org.
cordova_template to cordova-template


Project: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/commit/97081b67
Tree: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/tree/97081b67
Diff: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/diff/97081b67

Branch: refs/heads/master
Commit: 97081b674b922f1309671d48c26200aca079a6d7
Parents: c326607
Author: carynbear <ca...@berkeley.edu>
Authored: Fri Jul 15 14:33:57 2016 -0700
Committer: carynbear <ca...@berkeley.edu>
Committed: Fri Jul 15 14:33:57 2016 -0700

----------------------------------------------------------------------
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/97081b67/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 990a95c..c65048d 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
 {
-  "name": "cordova_template",
+  "name": "cordova-template",
   "version": "1.0.0",
   "description": "A reference for creating cordova app templates.",
   "main": "index.js",


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


[5/6] cordova-template-reference git commit: module.exports not module.export

Posted by st...@apache.org.
module.exports not module.export


Project: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/commit/c3266076
Tree: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/tree/c3266076
Diff: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/diff/c3266076

Branch: refs/heads/master
Commit: c326607671deffe148bffafdf0b1b2c4b862f24e
Parents: 2e6529d
Author: carynbear <ca...@berkeley.edu>
Authored: Fri Jul 15 14:25:27 2016 -0700
Committer: carynbear <ca...@berkeley.edu>
Committed: Fri Jul 15 14:25:27 2016 -0700

----------------------------------------------------------------------
 README.md | 2 +-
 index.js  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/c3266076/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 26d4693..00cadf2 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@ All files outside of `template_src` are used to define parameters about the temp
 ```javascript
 var path = require('path');
 
-module.export = {
+module.exports = {
     dirname : path.join(__dirname, 'template_src')
 };
 ```

http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/c3266076/index.js
----------------------------------------------------------------------
diff --git a/index.js b/index.js
index b4292e9..33116fd 100644
--- a/index.js
+++ b/index.js
@@ -1,5 +1,5 @@
 var path = require('path');
 
-module.export = {
+module.exports = {
     dirname : path.join(__dirname, 'template_src')
 };
\ No newline at end of file


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


[4/6] cordova-template-reference git commit: changed '=' to ':'

Posted by st...@apache.org.
changed '=' to ':'


Project: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/commit/2e6529d5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/tree/2e6529d5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-template-reference/diff/2e6529d5

Branch: refs/heads/master
Commit: 2e6529d502b0a7b10d533431043b54c2eaf25e4e
Parents: b2a185b
Author: carynbear <ca...@berkeley.edu>
Authored: Fri Jul 15 13:28:10 2016 -0700
Committer: carynbear <ca...@berkeley.edu>
Committed: Fri Jul 15 13:28:10 2016 -0700

----------------------------------------------------------------------
 README.md | 2 +-
 index.js  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/2e6529d5/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index a860b68..26d4693 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ All files outside of `template_src` are used to define parameters about the temp
 var path = require('path');
 
 module.export = {
-    dirname = path.join(__dirname, 'template_src')
+    dirname : path.join(__dirname, 'template_src')
 };
 ```
 

http://git-wip-us.apache.org/repos/asf/cordova-template-reference/blob/2e6529d5/index.js
----------------------------------------------------------------------
diff --git a/index.js b/index.js
index 8464292..b4292e9 100644
--- a/index.js
+++ b/index.js
@@ -1,5 +1,5 @@
 var path = require('path');
 
 module.export = {
-    dirname = path.join(__dirname, 'template_src')
+    dirname : path.join(__dirname, 'template_src')
 };
\ No newline at end of file


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