addon-sdk/source/python-lib/cuddlefish/templates.py

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/addon-sdk/source/python-lib/cuddlefish/templates.py	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,32 @@
     1.4 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.5 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.7 +
     1.8 +#Template used by test-main.js
     1.9 +TEST_MAIN_JS = '''\
    1.10 +var main = require("./main");
    1.11 +
    1.12 +exports["test main"] = function(assert) {
    1.13 +  assert.pass("Unit test running!");
    1.14 +};
    1.15 +
    1.16 +exports["test main async"] = function(assert, done) {
    1.17 +  assert.pass("async Unit test running!");
    1.18 +  done();
    1.19 +};
    1.20 +
    1.21 +require("sdk/test").run(exports);
    1.22 +'''
    1.23 +
    1.24 +#Template used by package.json
    1.25 +PACKAGE_JSON = '''\
    1.26 +{
    1.27 +  "name": "%(name)s",
    1.28 +  "title": "%(title)s",
    1.29 +  "id": "%(id)s",
    1.30 +  "description": "a basic add-on",
    1.31 +  "author": "",
    1.32 +  "license": "MPL 2.0",
    1.33 +  "version": "0.1"
    1.34 +}
    1.35 +'''

mercurial