-
-
Save roycehaynes/26376f8aa213e6de654a to your computer and use it in GitHub Desktop.
config.js (aka main.js)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require.config({ | |
deps: [ | |
'main', | |
'util/jquery.cookie', | |
'util/sprintf', | |
'util/uri', | |
'util/hashids', | |
'util/sha1' | |
], | |
paths: { | |
// application javascript. | |
libs: '../assets/js', | |
// Libraries | |
util: '../vendor/js/utilities', | |
plugins: '../vendor/js/plugins', | |
jquery:'../vendor/js/jquery-1.9.1.min', | |
underscore: '../vendor/js/underscore-1.4.4.min', | |
//backbone: '../vendor/js/backbone-0.9.9.min', | |
backbone: '../vendor/js/backbone', | |
stackmob: '../vendor/js/stackmob-0.7.0', | |
stripe: '../vendor/js/stripe/v1/stripe', | |
qunit: 'tests/qunit/1.11.0/qunit', | |
//jasmine:'tests/jasmine/1.3.1/jasmine', | |
//'jasmine-html':'tests/jasmine/1.3.1/jasmine-html', | |
text: '../vendor/js/text' | |
}, | |
shim: { | |
underscore: { | |
exports: '_' | |
}, | |
backbone: { | |
deps: ['underscore'], | |
exports: 'Backbone' | |
}, | |
stackmob: { | |
deps: ['backbone'], | |
exports: 'StackMob' | |
}, | |
'util/hashids': [], | |
'util/uri': [], | |
'util/sprintf': [], | |
'util/sha1': [], | |
'util/jquery.cookie': [], | |
'plugins/backbone.safe' : ['backbone'], | |
'plugins/backbone.layoutmanager': ['backbone'], | |
'plugins/backbone.modal' : ['backbone'], | |
'plugins/backbone.validation.amd' : ['backbone'], | |
qunit: { | |
exports: 'QUnit' | |
} | |
} | |
}); | |
define( ["stackmob", "stripe", "qunit"], | |
function(StackMob, Stripe, QUnit) { | |
// Initialize StackMob API | |
StackMob.init({ | |
appName: "mycreate", | |
clientSubdomain: "", | |
publicKey: "", | |
apiVersion: 0, | |
userSchema: "user", | |
apiURL: "https://api.stackmob.com/" | |
}); | |
//TODO: swap out for production key | |
Stripe.setPublishableKey(''); | |
QUnit.config.autostart = false; | |
QUnit.start(); //Tests loaded, run tests | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looking into it some more, loading QUnit through require seems to cause problems with the runner. I would load it as a separate script tag in the html.