javascript - How to include onsen using requirejs? -


i'm trying test app built using onsen-ui. we're using requirejs load onsen amongst other scripts. however, running our tests results in following error:

uncaught referenceerror: hammer not defined 

this relevant part scripts loaded

  require.config({   // karma serves files under /base, basepath config file   baseurl: '/base/www/js',    // example of using shim, load non amd libraries (such underscore , jquery)   paths: {     angular:          '../bower_components/angular/angular',     angularresource:  '../bower_components/angular-resource/angular-resource',     angularmocks:     '../bower_components/angular-mocks/angular-mocks',     onsenui:          '../bower_components/onsenui/build/js/onsenui',     statemachine:     '../bower_components/javascript-state-machine/state-machine',     ngraven:          '../bower_components/angular-raven/angular-raven',     underscore:       '../bower_components/underscore/underscore',     moment:           '../bower_components/momentjs/moment',     xml2json:         '../bower_components/x2js/xml2json'   },   shim: {     angular: {       exports: 'angular'     },     angularmocks: {       exports: 'angular.mock',       deps: ['angular']     },     ngraven: ['angular'],     angularresource: ['angular'],     onsenui: {       exports: 'onsen',       deps: ['angular']     },     underscore: {       exports: '_'     },     xml2json : {       exports : 'x2js'     }   },    // dynamically load test files   deps: tests,    // have kickoff jasmine, asynchronous   callback: window.__karma__.start }); 


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -