diff options
Diffstat (limited to 'addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages')
16 files changed, 87 insertions, 0 deletions
diff --git a/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/aardvark/doc/main.md b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/aardvark/doc/main.md new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/aardvark/doc/main.md diff --git a/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/aardvark/lib/ignore_me b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/aardvark/lib/ignore_me new file mode 100644 index 000000000..014242c92 --- /dev/null +++ b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/aardvark/lib/ignore_me @@ -0,0 +1,3 @@ +The docs processor should tolerate (by ignoring) random non-.js files in lib +directories, such as those left around by editors, version-control systems, +or OS metadata like .DS_Store . This file exercises that tolerance. diff --git a/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/aardvark/lib/main.js b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/aardvark/lib/main.js new file mode 100644 index 000000000..026487257 --- /dev/null +++ b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/aardvark/lib/main.js @@ -0,0 +1,8 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +exports.main = function(options, callbacks) { + console.log("1 + 1 =", require("bar-module").add(1, 1)); + callbacks.quit(); +}; diff --git a/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/aardvark/lib/surprise.js/ignore_me_too b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/aardvark/lib/surprise.js/ignore_me_too new file mode 100644 index 000000000..066f9b55d --- /dev/null +++ b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/aardvark/lib/surprise.js/ignore_me_too @@ -0,0 +1,2 @@ +The docs processor should also ignore directories named *.js, and their +contents. diff --git a/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/aardvark/package.json b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/aardvark/package.json new file mode 100644 index 000000000..afb5698e9 --- /dev/null +++ b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/aardvark/package.json @@ -0,0 +1,7 @@ +{ + "author": "Jon Smith", + "description": "A package w/ a main module; can be built into an extension.", + "keywords": ["potato"], + "version": "1.0", + "dependencies": ["addon-sdk", "barbeque"] +} diff --git a/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/anteater_files/lib/main.js b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/anteater_files/lib/main.js new file mode 100644 index 000000000..026487257 --- /dev/null +++ b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/anteater_files/lib/main.js @@ -0,0 +1,8 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +exports.main = function(options, callbacks) { + console.log("1 + 1 =", require("bar-module").add(1, 1)); + callbacks.quit(); +}; diff --git a/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/anteater_files/package.json b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/anteater_files/package.json new file mode 100644 index 000000000..9684581da --- /dev/null +++ b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/anteater_files/package.json @@ -0,0 +1,8 @@ +{ + "name": "anteater", + "author": "Jon Smith", + "description": "A package w/ a main module; can be built into an extension.", + "keywords": ["potato"], + "version": "1.0", + "dependencies": ["addon-sdk", "barbeque"] +} diff --git a/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/api-utils/lib/loader.js b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/api-utils/lib/loader.js new file mode 100644 index 000000000..361846d27 --- /dev/null +++ b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/api-utils/lib/loader.js @@ -0,0 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// This module will be imported by the XPCOM harness/boostrapper +// via Components.utils.import() and is responsible for creating a +// CommonJS module loader. diff --git a/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/api-utils/package.json b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/api-utils/package.json new file mode 100644 index 000000000..64eb065be --- /dev/null +++ b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/api-utils/package.json @@ -0,0 +1,5 @@ +{ + "description": "A foundational package that provides a CommonJS module loader implementation.", + "keywords": ["potato", "jetpack-low-level"], + "loader": "lib/loader.js" +} diff --git a/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/barbeque/lib/bar-module.js b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/barbeque/lib/bar-module.js new file mode 100644 index 000000000..ff982ae20 --- /dev/null +++ b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/barbeque/lib/bar-module.js @@ -0,0 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +exports.add = function add(a, b) { + return a + b; +}; diff --git a/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/barbeque/package.json b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/barbeque/package.json new file mode 100644 index 000000000..62e3c12d7 --- /dev/null +++ b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/barbeque/package.json @@ -0,0 +1,4 @@ +{ + "keywords": ["potato", "jetpack-low-level"], + "description": "A package used by 'aardvark' as a library." +} diff --git a/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/minimal/lib/main.js b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/minimal/lib/main.js new file mode 100644 index 000000000..aeda0e7fb --- /dev/null +++ b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/minimal/lib/main.js @@ -0,0 +1,8 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +exports.main = function(options, callbacks) { + console.log("minimal"); + callbacks.quit(); +}; diff --git a/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/minimal/package.json b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/minimal/package.json new file mode 100644 index 000000000..530f3c247 --- /dev/null +++ b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/minimal/package.json @@ -0,0 +1,4 @@ +{ + "author": "Jon Smith", + "description": "A package w/ a main module; can be built into an extension." +} diff --git a/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/third_party/docs/third_party.md b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/third_party/docs/third_party.md new file mode 100644 index 000000000..35152f601 --- /dev/null +++ b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/third_party/docs/third_party.md @@ -0,0 +1 @@ +hello, I'm a third party.
\ No newline at end of file diff --git a/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/third_party/lib/third-party.js b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/third_party/lib/third-party.js new file mode 100644 index 000000000..026487257 --- /dev/null +++ b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/third_party/lib/third-party.js @@ -0,0 +1,8 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +exports.main = function(options, callbacks) { + console.log("1 + 1 =", require("bar-module").add(1, 1)); + callbacks.quit(); +}; diff --git a/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/third_party/package.json b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/third_party/package.json new file mode 100644 index 000000000..afb5698e9 --- /dev/null +++ b/addon-sdk/source/python-lib/cuddlefish/tests/static-files/packages/third_party/package.json @@ -0,0 +1,7 @@ +{ + "author": "Jon Smith", + "description": "A package w/ a main module; can be built into an extension.", + "keywords": ["potato"], + "version": "1.0", + "dependencies": ["addon-sdk", "barbeque"] +} |