Skip to content
This repository
Browse code

Initial commit, from Volo.

  • Loading branch information...
commit d8fe86c3b79001106631755e3a0e126ec45d6ae6 0 parents
Blake Winton authored February 01, 2013
0  .gitignore
No changes.
5  README.md
Source Rendered
... ...
@@ -0,0 +1,5 @@
  1
+This project has the following setup:
  2
+
  3
+* .addon-sdk/ - a submodule containing the addon-sdk.
  4
+* More stuff to be added later.
  5
+
0  doc/main.md
Source Rendered
No changes.
24  lib/main.js
... ...
@@ -0,0 +1,24 @@
  1
+/* This Source Code Form is subject to the terms of the Mozilla Public
  2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
  4
+
  5
+/*jshint forin:true, noarg:true, noempty:true, eqeqeq:true, bitwise:true,
  6
+  strict:true, undef:true, curly:true, browser:true, es5:true,
  7
+  indent:2, maxerr:50, devel:true, node:true, boss:true, white:true,
  8
+  globalstrict:true, nomen:false, newcap:true*/
  9
+
  10
+/*global self:true, addon:true */
  11
+
  12
+"use strict";
  13
+
  14
+var isFirefox = require("sdk/system/xul-app").is("Firefox");
  15
+
  16
+if (isFirefox) {
  17
+  // Do some Firefox-specific stuff here.
  18
+} else {
  19
+  // Do some Fennec- (or Thunderbird-, or SeaMonkey-) specific stuff here.
  20
+}
  21
+
  22
+exports.main = function (options, callbacks) {
  23
+  // Main code goes here.
  24
+};
17  package.json
... ...
@@ -0,0 +1,17 @@
  1
+{
  2
+  "name": "addon",
  3
+  "fullName": "addon",
  4
+  "description": "a basic add-on",
  5
+  "author": "",
  6
+  "license": "MPL 2.0",
  7
+  "version": "0.1",
  8
+  "contributors": [],
  9
+  "repository": {},
  10
+  "bugs": {},
  11
+  "preferences": [],
  12
+  "amd": {},
  13
+  "volo": {
  14
+    "baseUrl": "data/js/lib",
  15
+    "dependencies": {}
  16
+  }
  17
+}
12  test/test-main.js
... ...
@@ -0,0 +1,12 @@
  1
+var main = require("main");
  2
+
  3
+exports["test main"] = function(assert) {
  4
+  assert.pass("Unit test running!");
  5
+};
  6
+
  7
+exports["test main async"] = function(assert, done) {
  8
+  assert.pass("async Unit test running!");
  9
+  done();
  10
+};
  11
+
  12
+require("test").run(exports);
24  volofile
... ...
@@ -0,0 +1,24 @@
  1
+/*global define, console, process */
  2
+
  3
+'use strict';
  4
+
  5
+module.exports = {
  6
+  onCreate: {
  7
+    run: function (d, v, namedArgs, appName) {
  8
+      // Now, get the submodules!
  9
+      if (v.exists('.git')) {
  10
+        v.spawn('git', ['submodule', 'init']);
  11
+        v.spawn('git', ['submodule', 'update']);
  12
+      } else {
  13
+        var moduleRegex = /^\W*path = (.*).*\W*url = (.*)$/gm;
  14
+        var modules = v.read('.gitmodules');
  15
+        for (var module = moduleRegex.exec(modules);
  16
+             module !== null;
  17
+             module = moduleRegex.exec(modules)) {
  18
+          console.log("git clone " + module[2] + " " + module[1]);
  19
+          v.spawn('git', ['clone', module[2], module[1]]);
  20
+        }
  21
+      }
  22
+    }
  23
+  }
  24
+};

0 notes on commit d8fe86c

Please sign in to comment.
Something went wrong with that request. Please try again.