Skip to content

Instantly share code, notes, and snippets.

@iaincarsberg
Created June 6, 2011 11:15
Show Gist options
  • Save iaincarsberg/1010078 to your computer and use it in GitHub Desktop.
Save iaincarsberg/1010078 to your computer and use it in GitHub Desktop.
state-of-te
[
"thorny math vector2",
"./config/other.json"
]
/*global window*/
(function ($, undefined) {
$.fn.something = function () {
// Modular code.
};
}(window.jQuery));
/*global require console*/
require('./thorny/base')('thorny math vector2')(function ($) {
var
v1 = $('thorny math vector2').factory(1, 2),
v2 = $('thorny math').find('vector2').factory(3, 4),
v3 = $('thorny').find('math').find('vector2').factory(5, 6),
v4 = $.find('thorny').find('math').find('vector2').factory(7, 8);
console.log(
v1,
v2,
v3,
v4
);
});
require('./thorny/base')('thorny math vector2')(function ($) {
...
require('./thorny/base')('./config/default.json', 'thorny some cool feature')(function ($) {
...
/*global window*/
(function (module) {
module.exports.factory = function (x, y) {
return {
x: x,
y: y
};
};
}((typeof window === 'undefined') ? module : window.thorny_path('./thorny/common/math/vector2')));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment