You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mw...@apache.org on 2013/11/14 01:22:52 UTC

[01/15] git commit: Initial commit.

Updated Branches:
  refs/heads/doclet [created] f4ee0267e


Initial commit.


Project: http://git-wip-us.apache.org/repos/asf/cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-labs/commit/78fd4dbb
Tree: http://git-wip-us.apache.org/repos/asf/cordova-labs/tree/78fd4dbb
Diff: http://git-wip-us.apache.org/repos/asf/cordova-labs/diff/78fd4dbb

Branch: refs/heads/doclet
Commit: 78fd4dbb32c90c4598e0952a8a9e07614ccfe260
Parents: 7a089f4
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Fri Nov 8 17:09:15 2013 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Fri Nov 8 17:09:15 2013 -0800

----------------------------------------------------------------------
 README.md | 44 +++++++-------------------------------------
 1 file changed, 7 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/78fd4dbb/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 72c6336..a319d17 100644
--- a/README.md
+++ b/README.md
@@ -1,42 +1,12 @@
-# Cordova Labs
+# Doclet [![Build Status][travis-ci-img]][travis-ci-url]
 
-> Caution: Safety Goggles are Recommended!
+> Modular Documentation
 
-## Purpose
+## Overview
 
-The purpose of this repo is for experimental code. Examples include demo apps,
-native api explorations, or anything really that does not fit in an existing Cordova platform.
+Doclet is a modular documentation system. It can parse any type of documentation
+and render to any format.
 
-## Project Organization
+[travis-ci-img]: https://travis-ci.org/mwbrooks/cordova-labs.png?branch=doclet
+[travis-ci-url]: https://travis-ci.org/mwbrooks/cordova-labs
 
-> Everyone works on a branch
-
-`master` branch should *never* have content.
-
-Each project should create a separate branch to work on. There are major benefits
-to this practice:
-
-- Each project has an isolate git history, which allows for easy migration to
-  a new git repository;
-- Working directory is not polluted with the files of other projects.
-- Projects will not step on each others toes.
-
-## Migrating Repositories
-
-One day, you labs project may grow up and need it's own repository.
-You can easily move all of your Git history to your new repository with the
-following steps:
-
-    # cd to labs and checkout your project's branch
-    git checkout my-branch
-
-    # add your new repository as a remote
-    git add remote my-remote <url>
-
-    # currently, my-remote should be empty (no commits)
-
-    # push my-branch to my-remote's master branch
-    git push my-remote my-branch:master
-
-    # now clone your new project (my-remote)
-    git clone <url>


[09/15] git commit: Add travis support.

Posted by mw...@apache.org.
Add travis support.


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

Branch: refs/heads/doclet
Commit: c740552f3dc865e654d1220605e45a5cb801a3d3
Parents: 93ce4fe
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Sat Nov 9 22:30:11 2013 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Sat Nov 9 22:30:11 2013 -0800

----------------------------------------------------------------------
 .travis.yml | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/c740552f/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..6e5919d
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+  - "0.10"


[03/15] git commit: Add doclet project.

Posted by mw...@apache.org.
Add doclet project.


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

Branch: refs/heads/doclet
Commit: a259a2c73c3f11ed165bb2ec732df17dc65f459a
Parents: 096c910
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Sat Nov 9 21:54:29 2013 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Sat Nov 9 21:54:29 2013 -0800

----------------------------------------------------------------------
 doclet/LICENSE      | 202 +++++++++++++++++++++++++++++++++++++++++++++++
 doclet/NOTICE       |   9 +++
 doclet/README.md    |  24 ++++++
 doclet/package.json |  40 ++++++++++
 4 files changed, 275 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/a259a2c7/doclet/LICENSE
----------------------------------------------------------------------
diff --git a/doclet/LICENSE b/doclet/LICENSE
new file mode 100644
index 0000000..b0b079f
--- /dev/null
+++ b/doclet/LICENSE
@@ -0,0 +1,202 @@
+                                 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
+ 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 2013 The Apache Software Foundation
+
+   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.

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/a259a2c7/doclet/NOTICE
----------------------------------------------------------------------
diff --git a/doclet/NOTICE b/doclet/NOTICE
new file mode 100644
index 0000000..cb3e11a
--- /dev/null
+++ b/doclet/NOTICE
@@ -0,0 +1,9 @@
+Doclet
+Copyright 2013 Adobe Systems Incorporated
+
+This software is licensed under the Apache License, Version 2.0 (see
+LICENSE file).
+
+This software uses the following third party libraries that may have
+licenses differing from that of the software itself. You can find the
+libraries and their respective licenses below.

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/a259a2c7/doclet/README.md
----------------------------------------------------------------------
diff --git a/doclet/README.md b/doclet/README.md
new file mode 100644
index 0000000..29d0cd5
--- /dev/null
+++ b/doclet/README.md
@@ -0,0 +1,24 @@
+# Doclet [![Build Status][travis-ci-img]][travis-ci-url]
+
+> Modular Documentation
+
+## Overview
+
+Doclet is a modular documentation system. It can parse any type of documentation
+and render to any format.
+
+## CLI
+
+    $ doclet path/to/project
+
+## Library
+
+    var doclet = require('doclet');
+
+    doclet.compile('path/to/project', function(e) {
+        // all done
+    });
+
+[travis-ci-img]: https://travis-ci.org/mwbrooks/cordova-labs.png?branch=doclet
+[travis-ci-url]: https://travis-ci.org/mwbrooks/cordova-labs
+

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/a259a2c7/doclet/package.json
----------------------------------------------------------------------
diff --git a/doclet/package.json b/doclet/package.json
new file mode 100644
index 0000000..8a36c93
--- /dev/null
+++ b/doclet/package.json
@@ -0,0 +1,40 @@
+{
+    "name": "doclet",
+    "description": "Your modular documentation system.",
+    "version": "0.0.1",
+    "homepage": "https://github.com/apache/cordova-labs/tree/doclet",
+    "repository": {
+        "type": "git",
+        "url": "https://git-wip-us.apache.org/repos/asf/cordova-labs.git"
+    },
+    "keywords": [
+        "docs",
+        "documentation"
+    ],
+    "preferGlobal": "true",
+    "main": "./lib/doclet/index.js",
+    "bin": {
+        "doclet": "./bin/index.js"
+    },
+    "scripts": {
+        "test": "jasmine-node --color spec"
+    },
+    "engines": {
+        "node": ">=0.10.0"
+    },
+    "dependencies": {
+        "optimist": "0.6.0"
+    },
+    "devDependencies": {
+        "jasmine-node": "1.8.0"
+    },
+    "optionalDependencies": {
+    },
+    "author": {
+        "name": "Michael Brooks",
+        "email": "michael@michaelbrooks.ca",
+        "url": "http://michaelbrooks.ca/"
+    },
+    "contributors": [
+    ]
+}


[13/15] git commit: Update formatting to 2 spaces.

Posted by mw...@apache.org.
Update formatting to 2 spaces.


Project: http://git-wip-us.apache.org/repos/asf/cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-labs/commit/22b5a502
Tree: http://git-wip-us.apache.org/repos/asf/cordova-labs/tree/22b5a502
Diff: http://git-wip-us.apache.org/repos/asf/cordova-labs/diff/22b5a502

Branch: refs/heads/doclet
Commit: 22b5a50262cc2cf20076be35edcd49ac90422225
Parents: ccb91fa
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Tue Nov 12 14:58:22 2013 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Tue Nov 12 14:58:22 2013 -0800

----------------------------------------------------------------------
 lib/cli/index.js       |  6 ++--
 lib/doclet/index.js    | 14 ++++----
 package.json           | 80 ++++++++++++++++++++++-----------------------
 spec/bin/index.spec.js | 18 +++++-----
 spec/cli/index.spec.js | 26 +++++++--------
 5 files changed, 72 insertions(+), 72 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/22b5a502/lib/cli/index.js
----------------------------------------------------------------------
diff --git a/lib/cli/index.js b/lib/cli/index.js
index 2dbb294..532bcf3 100644
--- a/lib/cli/index.js
+++ b/lib/cli/index.js
@@ -14,7 +14,7 @@ var optimist = require('optimist'),
  */
 
 module.exports.exec = function(argv) {
-    // parse the arguments and compile with optional path
-    argv = optimist.parse(argv);
-    doclet.compile(argv._[2]);
+  // parse the arguments and compile with optional path
+  argv = optimist.parse(argv);
+  doclet.compile(argv._[2]);
 };

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/22b5a502/lib/doclet/index.js
----------------------------------------------------------------------
diff --git a/lib/doclet/index.js b/lib/doclet/index.js
index 6f7a917..06125a5 100644
--- a/lib/doclet/index.js
+++ b/lib/doclet/index.js
@@ -13,12 +13,12 @@ var dir = require('node-dir');
  */
 
 module.exports.compile = function(path) {
-    // default to current working directory
-    path = path || process.cwd();
+  // default to current working directory
+  path = path || process.cwd();
 
-    // each file
-    dir.paths(path, function(e, paths) {
-        // parse markdown
-        // render html
-    });
+  // each file
+  dir.paths(path, function(e, paths) {
+    // parse markdown
+    // render html
+  });
 };

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/22b5a502/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index b98c9f1..838799d 100644
--- a/package.json
+++ b/package.json
@@ -1,42 +1,42 @@
 {
-    "name": "doclet",
-    "description": "Your modular documentation system.",
-    "version": "0.0.1",
-    "homepage": "https://github.com/apache/cordova-labs/tree/doclet",
-    "repository": {
-        "type": "git",
-        "url": "https://git-wip-us.apache.org/repos/asf/cordova-labs.git"
-    },
-    "keywords": [
-        "docs",
-        "documentation"
-    ],
-    "preferGlobal": "true",
-    "main": "./lib/doclet/index.js",
-    "bin": {
-        "doclet": "./bin/index.js"
-    },
-    "scripts": {
-        "test": "jasmine-node --color spec"
-    },
-    "engines": {
-        "node": ">=0.10.0"
-    },
-    "dependencies": {
-        "node-dir": "0.1.5",
-        "optimist": "0.6.0",
-        "shelljs": "0.2.6"
-    },
-    "devDependencies": {
-        "jasmine-node": "1.8.0"
-    },
-    "optionalDependencies": {
-    },
-    "author": {
-        "name": "Michael Brooks",
-        "email": "michael@michaelbrooks.ca",
-        "url": "http://michaelbrooks.ca/"
-    },
-    "contributors": [
-    ]
+  "name": "doclet",
+  "description": "Your modular documentation system.",
+  "version": "0.0.1",
+  "homepage": "https://github.com/apache/cordova-labs/tree/doclet",
+  "repository": {
+    "type": "git",
+    "url": "https://git-wip-us.apache.org/repos/asf/cordova-labs.git"
+  },
+  "keywords": [
+    "docs",
+    "documentation"
+  ],
+  "preferGlobal": "true",
+  "main": "./lib/doclet/index.js",
+  "bin": {
+    "doclet": "./bin/index.js"
+  },
+  "scripts": {
+    "test": "jasmine-node --color spec"
+  },
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "dependencies": {
+    "node-dir": "0.1.5",
+    "optimist": "0.6.0",
+    "shelljs": "0.2.6"
+  },
+  "devDependencies": {
+    "jasmine-node": "1.8.0"
+  },
+  "optionalDependencies": {
+  },
+  "author": {
+    "name": "Michael Brooks",
+    "email": "michael@michaelbrooks.ca",
+    "url": "http://michaelbrooks.ca/"
+  },
+  "contributors": [
+  ]
 }

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/22b5a502/spec/bin/index.spec.js
----------------------------------------------------------------------
diff --git a/spec/bin/index.spec.js b/spec/bin/index.spec.js
index 8e12ec5..411be3b 100644
--- a/spec/bin/index.spec.js
+++ b/spec/bin/index.spec.js
@@ -12,14 +12,14 @@ var shell = require('shelljs'),
  */
 
 describe('$ doclet [options] <path>', function() {
-    beforeEach(function() {
-        bin = 'node ' + path.resolve(path.join(__dirname, '..', '..', 'bin', 'index.js'));
-        options = { silent: true };
-        spyOn(process.stdout, 'write');
-    });
+  beforeEach(function() {
+    bin = 'node ' + path.resolve(path.join(__dirname, '..', '..', 'bin', 'index.js'));
+    options = { silent: true };
+    spyOn(process.stdout, 'write');
+  });
 
-    it('should have exit code 0', function() {
-        var process = shell.exec(bin, options);
-        expect(process.code).toEqual(0);
-    });
+  it('should have exit code 0', function() {
+    var process = shell.exec(bin, options);
+    expect(process.code).toEqual(0);
+  });
 });

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/22b5a502/spec/cli/index.spec.js
----------------------------------------------------------------------
diff --git a/spec/cli/index.spec.js b/spec/cli/index.spec.js
index a664128..09390d0 100644
--- a/spec/cli/index.spec.js
+++ b/spec/cli/index.spec.js
@@ -11,19 +11,19 @@ var cli = require('../../lib/cli'),
  */
 
 describe('cli.exec(argv)', function() {
-    beforeEach(function() {
-        argv = ['node', '/usr/local/bin/doclet'];
-        spyOn(doclet, 'compile');
-    });
+  beforeEach(function() {
+    argv = ['node', '/usr/local/bin/doclet'];
+    spyOn(doclet, 'compile');
+  });
 
-    it('should call doclet.compile', function() {
-        cli.exec(argv);
-        expect(doclet.compile).toHaveBeenCalledWith(undefined);
-    });
+  it('should call doclet.compile', function() {
+    cli.exec(argv);
+    expect(doclet.compile).toHaveBeenCalledWith(undefined);
+  });
 
-    it('should support a path argument', function() {
-        argv.push('/some/path');
-        cli.exec(argv);
-        expect(doclet.compile).toHaveBeenCalledWith('/some/path');
-    });
+  it('should support a path argument', function() {
+    argv.push('/some/path');
+    cli.exec(argv);
+    expect(doclet.compile).toHaveBeenCalledWith('/some/path');
+  });
 });


[15/15] git commit: [lib] Add markdown parsing.

Posted by mw...@apache.org.
[lib] Add markdown parsing.


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

Branch: refs/heads/doclet
Commit: f4ee0267e316af1e9385d590931939258cd8d131
Parents: 05ae2cd
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Wed Nov 13 16:22:14 2013 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Wed Nov 13 16:22:14 2013 -0800

----------------------------------------------------------------------
 lib/doclet/index.js       | 38 ++++++++++++++++++++++++++++++++++----
 package.json              |  2 ++
 spec/doclet/index.spec.js | 20 ++++++++++++++++++++
 3 files changed, 56 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/f4ee0267/lib/doclet/index.js
----------------------------------------------------------------------
diff --git a/lib/doclet/index.js b/lib/doclet/index.js
index 06125a5..498f75a 100644
--- a/lib/doclet/index.js
+++ b/lib/doclet/index.js
@@ -2,7 +2,11 @@
  * Module dependencies.
  */
 
-var dir = require('node-dir');
+var async = require('async'),
+    dir = require('node-dir'),
+    fs = require('fs'),
+    marked = require('marked'),
+    path = require('path');
 
 /**
  * Doclet compiler.
@@ -16,9 +20,35 @@ module.exports.compile = function(path) {
   // default to current working directory
   path = path || process.cwd();
 
-  // each file
+  // configure markdown parser
+  marked.setOptions({
+    gfm: true,
+    tables: true,
+    breaks: false,
+    pedantic: false,
+    sanitize: false,
+    smartLists: true
+  });
+
+  // find all files
   dir.paths(path, function(e, paths) {
-    // parse markdown
-    // render html
+    // iterate each file
+    async.each(paths.files, function(filepath, callback) {
+      // render markdown
+      if (isMarkdown(filepath)) {
+        console.log(module.exports.markdown(filepath));
+      }
+      else {
+        console.log('cp asset'); 
+      }
+    });
   });
 };
+
+module.exports.markdown = function(filepath) {
+  return marked(fs.readFileSync(filepath, 'utf8'));
+};
+
+function isMarkdown(filepath) {
+  return (['.md'].indexOf(path.extname(filepath)) >= 0);
+}

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/f4ee0267/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 838799d..3f61469 100644
--- a/package.json
+++ b/package.json
@@ -23,6 +23,8 @@
     "node": ">=0.10.0"
   },
   "dependencies": {
+    "async": "0.2.9",
+    "marked": "0.2.10",
     "node-dir": "0.1.5",
     "optimist": "0.6.0",
     "shelljs": "0.2.6"

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/f4ee0267/spec/doclet/index.spec.js
----------------------------------------------------------------------
diff --git a/spec/doclet/index.spec.js b/spec/doclet/index.spec.js
index 5704657..6982215 100644
--- a/spec/doclet/index.spec.js
+++ b/spec/doclet/index.spec.js
@@ -4,6 +4,7 @@
 
 var dir = require('node-dir'),
     doclet = require('../../lib/doclet'),
+    fs = require('fs'),
     options;
 
 /*!
@@ -37,4 +38,23 @@ describe('doclet.compile(path)', function() {
       );
     });
   });
+
+  describe('markdown parser', function() {
+    beforeEach(function() {
+      dir.paths.andCallFake(function(path, callback) {
+        callback(null, { files: [
+          '/some/path/file-1.md',
+          '/some/path/file-2.md',
+          '/some/path/file-3.md'
+        ]});
+      });
+      spyOn(fs, 'readFileSync').andReturn('# Markdown');
+      spyOn(doclet, 'markdown');
+    });
+
+    it('should be called for each file', function() {
+      doclet.compile(options);
+      expect(doclet.markdown.calls.length).toEqual(3);
+    });
+  });
 });


[04/15] git commit: Move doclet to root.

Posted by mw...@apache.org.
Move doclet to root.


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

Branch: refs/heads/doclet
Commit: d99ef12ca1e880a5b2ea8fc5da0abacf3643cf6f
Parents: a259a2c
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Sat Nov 9 22:03:22 2013 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Sat Nov 9 22:03:22 2013 -0800

----------------------------------------------------------------------
 README.md           |  12 +++
 doclet/LICENSE      | 202 -----------------------------------------------
 doclet/NOTICE       |   9 ---
 doclet/README.md    |  24 ------
 doclet/package.json |  40 ----------
 package.json        |  40 ++++++++++
 6 files changed, 52 insertions(+), 275 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/d99ef12c/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index a319d17..29d0cd5 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,18 @@
 Doclet is a modular documentation system. It can parse any type of documentation
 and render to any format.
 
+## CLI
+
+    $ doclet path/to/project
+
+## Library
+
+    var doclet = require('doclet');
+
+    doclet.compile('path/to/project', function(e) {
+        // all done
+    });
+
 [travis-ci-img]: https://travis-ci.org/mwbrooks/cordova-labs.png?branch=doclet
 [travis-ci-url]: https://travis-ci.org/mwbrooks/cordova-labs
 

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/d99ef12c/doclet/LICENSE
----------------------------------------------------------------------
diff --git a/doclet/LICENSE b/doclet/LICENSE
deleted file mode 100644
index b0b079f..0000000
--- a/doclet/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-                                 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
- 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 2013 The Apache Software Foundation
-
-   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.

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/d99ef12c/doclet/NOTICE
----------------------------------------------------------------------
diff --git a/doclet/NOTICE b/doclet/NOTICE
deleted file mode 100644
index cb3e11a..0000000
--- a/doclet/NOTICE
+++ /dev/null
@@ -1,9 +0,0 @@
-Doclet
-Copyright 2013 Adobe Systems Incorporated
-
-This software is licensed under the Apache License, Version 2.0 (see
-LICENSE file).
-
-This software uses the following third party libraries that may have
-licenses differing from that of the software itself. You can find the
-libraries and their respective licenses below.

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/d99ef12c/doclet/README.md
----------------------------------------------------------------------
diff --git a/doclet/README.md b/doclet/README.md
deleted file mode 100644
index 29d0cd5..0000000
--- a/doclet/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# Doclet [![Build Status][travis-ci-img]][travis-ci-url]
-
-> Modular Documentation
-
-## Overview
-
-Doclet is a modular documentation system. It can parse any type of documentation
-and render to any format.
-
-## CLI
-
-    $ doclet path/to/project
-
-## Library
-
-    var doclet = require('doclet');
-
-    doclet.compile('path/to/project', function(e) {
-        // all done
-    });
-
-[travis-ci-img]: https://travis-ci.org/mwbrooks/cordova-labs.png?branch=doclet
-[travis-ci-url]: https://travis-ci.org/mwbrooks/cordova-labs
-

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/d99ef12c/doclet/package.json
----------------------------------------------------------------------
diff --git a/doclet/package.json b/doclet/package.json
deleted file mode 100644
index 8a36c93..0000000
--- a/doclet/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
-    "name": "doclet",
-    "description": "Your modular documentation system.",
-    "version": "0.0.1",
-    "homepage": "https://github.com/apache/cordova-labs/tree/doclet",
-    "repository": {
-        "type": "git",
-        "url": "https://git-wip-us.apache.org/repos/asf/cordova-labs.git"
-    },
-    "keywords": [
-        "docs",
-        "documentation"
-    ],
-    "preferGlobal": "true",
-    "main": "./lib/doclet/index.js",
-    "bin": {
-        "doclet": "./bin/index.js"
-    },
-    "scripts": {
-        "test": "jasmine-node --color spec"
-    },
-    "engines": {
-        "node": ">=0.10.0"
-    },
-    "dependencies": {
-        "optimist": "0.6.0"
-    },
-    "devDependencies": {
-        "jasmine-node": "1.8.0"
-    },
-    "optionalDependencies": {
-    },
-    "author": {
-        "name": "Michael Brooks",
-        "email": "michael@michaelbrooks.ca",
-        "url": "http://michaelbrooks.ca/"
-    },
-    "contributors": [
-    ]
-}

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/d99ef12c/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..8a36c93
--- /dev/null
+++ b/package.json
@@ -0,0 +1,40 @@
+{
+    "name": "doclet",
+    "description": "Your modular documentation system.",
+    "version": "0.0.1",
+    "homepage": "https://github.com/apache/cordova-labs/tree/doclet",
+    "repository": {
+        "type": "git",
+        "url": "https://git-wip-us.apache.org/repos/asf/cordova-labs.git"
+    },
+    "keywords": [
+        "docs",
+        "documentation"
+    ],
+    "preferGlobal": "true",
+    "main": "./lib/doclet/index.js",
+    "bin": {
+        "doclet": "./bin/index.js"
+    },
+    "scripts": {
+        "test": "jasmine-node --color spec"
+    },
+    "engines": {
+        "node": ">=0.10.0"
+    },
+    "dependencies": {
+        "optimist": "0.6.0"
+    },
+    "devDependencies": {
+        "jasmine-node": "1.8.0"
+    },
+    "optionalDependencies": {
+    },
+    "author": {
+        "name": "Michael Brooks",
+        "email": "michael@michaelbrooks.ca",
+        "url": "http://michaelbrooks.ca/"
+    },
+    "contributors": [
+    ]
+}


[05/15] git commit: Add .gitignore.

Posted by mw...@apache.org.
Add .gitignore.


Project: http://git-wip-us.apache.org/repos/asf/cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-labs/commit/453936c7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-labs/tree/453936c7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-labs/diff/453936c7

Branch: refs/heads/doclet
Commit: 453936c72862918c8d047c8d46cfc79ce4a6e041
Parents: d99ef12
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Sat Nov 9 22:04:07 2013 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Sat Nov 9 22:04:07 2013 -0800

----------------------------------------------------------------------
 .gitignore | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/453936c7/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index fd29596..8f950f3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
-# OS X
+# Mac
 .DS_Store
+
+# Node
+/node_modules/


[02/15] git commit: Add LICENSE and NOTICE.

Posted by mw...@apache.org.
Add LICENSE and NOTICE.


Project: http://git-wip-us.apache.org/repos/asf/cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-labs/commit/096c9107
Tree: http://git-wip-us.apache.org/repos/asf/cordova-labs/tree/096c9107
Diff: http://git-wip-us.apache.org/repos/asf/cordova-labs/diff/096c9107

Branch: refs/heads/doclet
Commit: 096c9107805223519c6e86bd331b9cf59a149a23
Parents: 78fd4db
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Fri Nov 8 17:11:27 2013 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Fri Nov 8 17:11:27 2013 -0800

----------------------------------------------------------------------
 LICENSE | 202 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 NOTICE  |   9 +++
 2 files changed, 211 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/096c9107/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..b0b079f
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+                                 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
+ 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 2013 The Apache Software Foundation
+
+   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.

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/096c9107/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..cb3e11a
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,9 @@
+Doclet
+Copyright 2013 Adobe Systems Incorporated
+
+This software is licensed under the Apache License, Version 2.0 (see
+LICENSE file).
+
+This software uses the following third party libraries that may have
+licenses differing from that of the software itself. You can find the
+libraries and their respective licenses below.


[06/15] git commit: [spec] Add shell script specification.

Posted by mw...@apache.org.
[spec] Add shell script specification.


Project: http://git-wip-us.apache.org/repos/asf/cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-labs/commit/4da9318a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-labs/tree/4da9318a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-labs/diff/4da9318a

Branch: refs/heads/doclet
Commit: 4da9318a0e37c92216d19328bf476e33512ac98a
Parents: 453936c
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Sat Nov 9 22:10:21 2013 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Sat Nov 9 22:10:21 2013 -0800

----------------------------------------------------------------------
 package.json           |  3 ++-
 spec/bin/index.spec.js | 29 +++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/4da9318a/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 8a36c93..4cce6c6 100644
--- a/package.json
+++ b/package.json
@@ -23,7 +23,8 @@
         "node": ">=0.10.0"
     },
     "dependencies": {
-        "optimist": "0.6.0"
+        "optimist": "0.6.0",
+        "shelljs": "0.2.6"
     },
     "devDependencies": {
         "jasmine-node": "1.8.0"

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/4da9318a/spec/bin/index.spec.js
----------------------------------------------------------------------
diff --git a/spec/bin/index.spec.js b/spec/bin/index.spec.js
new file mode 100644
index 0000000..8104447
--- /dev/null
+++ b/spec/bin/index.spec.js
@@ -0,0 +1,29 @@
+/*!
+ * Module dependencies.
+ */
+
+var shell = require('shelljs'),
+    path = require('path'),
+    bin,
+    options;
+
+/*!
+ * Shell script specification.
+ */
+
+describe('$ doclet [options] <path>', function() {
+    beforeEach(function() {
+        bin = 'node ' + path.resolve(path.join(__dirname, '..', '..', 'bin'));
+        options = { silent: true };
+        spyOn(process.stdout, 'write');
+    });
+
+    it('should exist', function() {
+        expect(shell.test('-e', bin)).toEqual(true);
+    });
+
+    it('should have exit code 0', function() {
+        var process = shell.exec(bin, options);
+        expect(process.code).toEqual(0);
+    });
+});


[11/15] git commit: [lib] Iterate over each directory.

Posted by mw...@apache.org.
[lib] Iterate over each directory.


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

Branch: refs/heads/doclet
Commit: dc8ad0449a0d7c329366c09543f023b692d81f06
Parents: 125498d
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Tue Nov 12 14:51:13 2013 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Tue Nov 12 14:51:13 2013 -0800

----------------------------------------------------------------------
 lib/doclet/index.js | 10 ++++++++++
 package.json        |  1 +
 2 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/dc8ad044/lib/doclet/index.js
----------------------------------------------------------------------
diff --git a/lib/doclet/index.js b/lib/doclet/index.js
index ec462b2..6f7a917 100644
--- a/lib/doclet/index.js
+++ b/lib/doclet/index.js
@@ -2,6 +2,8 @@
  * Module dependencies.
  */
 
+var dir = require('node-dir');
+
 /**
  * Doclet compiler.
  *
@@ -11,4 +13,12 @@
  */
 
 module.exports.compile = function(path) {
+    // default to current working directory
+    path = path || process.cwd();
+
+    // each file
+    dir.paths(path, function(e, paths) {
+        // parse markdown
+        // render html
+    });
 };

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/dc8ad044/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 4cce6c6..b98c9f1 100644
--- a/package.json
+++ b/package.json
@@ -23,6 +23,7 @@
         "node": ">=0.10.0"
     },
     "dependencies": {
+        "node-dir": "0.1.5",
         "optimist": "0.6.0",
         "shelljs": "0.2.6"
     },


[14/15] git commit: [spec] Refactor doclet.compile spec.

Posted by mw...@apache.org.
[spec] Refactor doclet.compile spec.


Project: http://git-wip-us.apache.org/repos/asf/cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-labs/commit/05ae2cda
Tree: http://git-wip-us.apache.org/repos/asf/cordova-labs/tree/05ae2cda
Diff: http://git-wip-us.apache.org/repos/asf/cordova-labs/diff/05ae2cda

Branch: refs/heads/doclet
Commit: 05ae2cdad41f3156cf11b34c7cd1b2d5adba858b
Parents: 22b5a50
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Tue Nov 12 15:08:47 2013 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Tue Nov 12 15:08:47 2013 -0800

----------------------------------------------------------------------
 spec/doclet/index.spec.js | 28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/05ae2cda/spec/doclet/index.spec.js
----------------------------------------------------------------------
diff --git a/spec/doclet/index.spec.js b/spec/doclet/index.spec.js
index 13b5498..5704657 100644
--- a/spec/doclet/index.spec.js
+++ b/spec/doclet/index.spec.js
@@ -16,15 +16,25 @@ describe('doclet.compile(path)', function() {
     spyOn(dir, 'paths');
   });
 
-  it('should not require path argument', function() {
-    expect(doclet.compile).not.toThrow();
-  });
+  describe('path parameter', function() {
+    it('should not be required', function() {
+      expect(doclet.compile).not.toThrow();
+    });
+
+    it('should default cwd', function() {
+      doclet.compile();
+      expect(dir.paths).toHaveBeenCalledWith(
+        process.cwd(),
+        jasmine.any(Function)
+      );
+    });
 
-  it('should default path to cwd', function() {
-    doclet.compile();
-    expect(dir.paths).toHaveBeenCalledWith(
-      process.cwd(),
-      jasmine.any(Function)
-    );
+    it('should be supported', function() {
+      doclet.compile(options);
+      expect(dir.paths).toHaveBeenCalledWith(
+        options,
+        jasmine.any(Function)
+      );
+    });
   });
 });


[08/15] git commit: [lib] Add doclet compile method.

Posted by mw...@apache.org.
[lib] Add doclet compile method.


Project: http://git-wip-us.apache.org/repos/asf/cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-labs/commit/93ce4fec
Tree: http://git-wip-us.apache.org/repos/asf/cordova-labs/tree/93ce4fec
Diff: http://git-wip-us.apache.org/repos/asf/cordova-labs/diff/93ce4fec

Branch: refs/heads/doclet
Commit: 93ce4fecf186803df450840ce03467a30bcb0edb
Parents: 42728b1
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Sat Nov 9 22:26:42 2013 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Sat Nov 9 22:26:42 2013 -0800

----------------------------------------------------------------------
 lib/cli/index.js       |  4 +++-
 lib/doclet/index.js    | 14 ++++++++++++++
 spec/cli/index.spec.js | 23 +++++++++++++++++++++++
 3 files changed, 40 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/93ce4fec/lib/cli/index.js
----------------------------------------------------------------------
diff --git a/lib/cli/index.js b/lib/cli/index.js
index 281a5c6..2257dbf 100644
--- a/lib/cli/index.js
+++ b/lib/cli/index.js
@@ -2,7 +2,8 @@
  * Module dependencies.
  */
 
-var optimist = require('optimist');
+var optimist = require('optimist'),
+    doclet = require('../doclet');
 
 /**
  * CLI execution.
@@ -14,6 +15,7 @@ var optimist = require('optimist');
 
 module.exports.exec = function(argv) {
     argv = optimist.parse(argv);
+    doclet.compile();
 
     //var paths = argv._.splice(2);
     //argv._ = undefined;

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/93ce4fec/lib/doclet/index.js
----------------------------------------------------------------------
diff --git a/lib/doclet/index.js b/lib/doclet/index.js
new file mode 100644
index 0000000..ec462b2
--- /dev/null
+++ b/lib/doclet/index.js
@@ -0,0 +1,14 @@
+/*!
+ * Module dependencies.
+ */
+
+/**
+ * Doclet compiler.
+ *
+ * Compiles the documentation.
+ *
+ * @param {String} path is the documentation path.
+ */
+
+module.exports.compile = function(path) {
+};

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/93ce4fec/spec/cli/index.spec.js
----------------------------------------------------------------------
diff --git a/spec/cli/index.spec.js b/spec/cli/index.spec.js
new file mode 100644
index 0000000..6036e3a
--- /dev/null
+++ b/spec/cli/index.spec.js
@@ -0,0 +1,23 @@
+/*!
+ * Module dependencies.
+ */
+
+var cli = require('../../lib/cli'),
+    doclet = require('../../lib/doclet'),
+    argv;
+
+/*!
+ * CLI specification.
+ */
+
+describe('cli.exec(argv)', function() {
+    beforeEach(function() {
+        argv = ['node', '/usr/local/bin/doclet'];
+        spyOn(doclet, 'compile');
+    });
+
+    it('should call doclet.compile', function() {
+        cli.exec(argv);
+        expect(doclet.compile).toHaveBeenCalled();
+    });
+});


[12/15] git commit: [spec] Add doclet spec.

Posted by mw...@apache.org.
[spec] Add doclet spec.


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

Branch: refs/heads/doclet
Commit: ccb91fa3f07628d6e6f2359536eed8f7b189cea6
Parents: dc8ad04
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Tue Nov 12 14:58:09 2013 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Tue Nov 12 14:58:09 2013 -0800

----------------------------------------------------------------------
 spec/doclet/index.spec.js | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/ccb91fa3/spec/doclet/index.spec.js
----------------------------------------------------------------------
diff --git a/spec/doclet/index.spec.js b/spec/doclet/index.spec.js
new file mode 100644
index 0000000..13b5498
--- /dev/null
+++ b/spec/doclet/index.spec.js
@@ -0,0 +1,30 @@
+/*!
+ * Module dependencies.
+ */
+
+var dir = require('node-dir'),
+    doclet = require('../../lib/doclet'),
+    options;
+
+/*!
+ * Doclet specification.
+ */
+
+describe('doclet.compile(path)', function() {
+  beforeEach(function() {
+    options = '/some/path';
+    spyOn(dir, 'paths');
+  });
+
+  it('should not require path argument', function() {
+    expect(doclet.compile).not.toThrow();
+  });
+
+  it('should default path to cwd', function() {
+    doclet.compile();
+    expect(dir.paths).toHaveBeenCalledWith(
+      process.cwd(),
+      jasmine.any(Function)
+    );
+  });
+});


[07/15] git commit: [cli] Add shell entry point.

Posted by mw...@apache.org.
[cli] Add shell entry point.


Project: http://git-wip-us.apache.org/repos/asf/cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-labs/commit/42728b1a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-labs/tree/42728b1a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-labs/diff/42728b1a

Branch: refs/heads/doclet
Commit: 42728b1af338b59a7e37d341d9e25428cd79b7ae
Parents: 4da9318
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Sat Nov 9 22:15:57 2013 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Sat Nov 9 22:15:57 2013 -0800

----------------------------------------------------------------------
 bin/index.js           | 13 +++++++++++++
 lib/cli/index.js       | 21 +++++++++++++++++++++
 spec/bin/index.spec.js |  6 +-----
 3 files changed, 35 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/42728b1a/bin/index.js
----------------------------------------------------------------------
diff --git a/bin/index.js b/bin/index.js
new file mode 100755
index 0000000..1e9b63c
--- /dev/null
+++ b/bin/index.js
@@ -0,0 +1,13 @@
+#!/usr/bin/env node
+
+/*!
+ * Module dependencies.
+ */
+
+var cli = require('../lib/cli');
+
+/*!
+ * Execute with the command-line arguments.
+ */
+
+cli.exec(process.argv);

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/42728b1a/lib/cli/index.js
----------------------------------------------------------------------
diff --git a/lib/cli/index.js b/lib/cli/index.js
new file mode 100644
index 0000000..281a5c6
--- /dev/null
+++ b/lib/cli/index.js
@@ -0,0 +1,21 @@
+/*!
+ * Module dependencies.
+ */
+
+var optimist = require('optimist');
+
+/**
+ * CLI execution.
+ *
+ * Execute a command from the command-line.
+ *
+ * @param {String} argv is the value of process.argv.
+ */
+
+module.exports.exec = function(argv) {
+    argv = optimist.parse(argv);
+
+    //var paths = argv._.splice(2);
+    //argv._ = undefined;
+    //argv.$0 = undefined;
+};

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/42728b1a/spec/bin/index.spec.js
----------------------------------------------------------------------
diff --git a/spec/bin/index.spec.js b/spec/bin/index.spec.js
index 8104447..8e12ec5 100644
--- a/spec/bin/index.spec.js
+++ b/spec/bin/index.spec.js
@@ -13,15 +13,11 @@ var shell = require('shelljs'),
 
 describe('$ doclet [options] <path>', function() {
     beforeEach(function() {
-        bin = 'node ' + path.resolve(path.join(__dirname, '..', '..', 'bin'));
+        bin = 'node ' + path.resolve(path.join(__dirname, '..', '..', 'bin', 'index.js'));
         options = { silent: true };
         spyOn(process.stdout, 'write');
     });
 
-    it('should exist', function() {
-        expect(shell.test('-e', bin)).toEqual(true);
-    });
-
     it('should have exit code 0', function() {
         var process = shell.exec(bin, options);
         expect(process.code).toEqual(0);


[10/15] git commit: [cli] Support passing the path to compile.

Posted by mw...@apache.org.
[cli] Support passing the path to compile.


Project: http://git-wip-us.apache.org/repos/asf/cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-labs/commit/125498d2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-labs/tree/125498d2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-labs/diff/125498d2

Branch: refs/heads/doclet
Commit: 125498d20d094c112a6c3cc4a7a27a293bda6f1b
Parents: c740552
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Tue Nov 12 14:16:57 2013 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Tue Nov 12 14:16:57 2013 -0800

----------------------------------------------------------------------
 lib/cli/index.js       | 7 ++-----
 spec/cli/index.spec.js | 8 +++++++-
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/125498d2/lib/cli/index.js
----------------------------------------------------------------------
diff --git a/lib/cli/index.js b/lib/cli/index.js
index 2257dbf..2dbb294 100644
--- a/lib/cli/index.js
+++ b/lib/cli/index.js
@@ -14,10 +14,7 @@ var optimist = require('optimist'),
  */
 
 module.exports.exec = function(argv) {
+    // parse the arguments and compile with optional path
     argv = optimist.parse(argv);
-    doclet.compile();
-
-    //var paths = argv._.splice(2);
-    //argv._ = undefined;
-    //argv.$0 = undefined;
+    doclet.compile(argv._[2]);
 };

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/125498d2/spec/cli/index.spec.js
----------------------------------------------------------------------
diff --git a/spec/cli/index.spec.js b/spec/cli/index.spec.js
index 6036e3a..a664128 100644
--- a/spec/cli/index.spec.js
+++ b/spec/cli/index.spec.js
@@ -18,6 +18,12 @@ describe('cli.exec(argv)', function() {
 
     it('should call doclet.compile', function() {
         cli.exec(argv);
-        expect(doclet.compile).toHaveBeenCalled();
+        expect(doclet.compile).toHaveBeenCalledWith(undefined);
+    });
+
+    it('should support a path argument', function() {
+        argv.push('/some/path');
+        cli.exec(argv);
+        expect(doclet.compile).toHaveBeenCalledWith('/some/path');
     });
 });