jquery - How to register Foundation 5 as AMD module with Require.js -


i have backbone, marionette , foundation 5 framework , works fine can't register foundation js lib amd module require.js. has successfuly done this? in example put tooltip component in.

how can register foundation 5 amd module require.js ?

here code:

require.config({     baseurl:                './js',     paths:{         // core libraries         jquery:             'libs/foundation/vendor/jquery',          // foundation 5                modernizr:          'libs/foundation/vendor/modernizr',          tooltip:        'libs/foundation/foundation/foundation.tooltip',             foundation:     'libs/foundation/foundation/foundation'     },      shim:{         // foundation ui framework         tooltip:    { deps: ['foundation'] },             foundation:     { deps: ['jquery','modernizr'] },      },   });     require(['jquery','backbone','marionette','app/app','foundation','tooltip'],      function ($) {          // start marionette application in desktop mode (default)         app.start();          $(document).foundation();      }); 

i'm looking this:

http://matznermatzner.de/en/bernd/2013/12/loading-non-amd-modules-requirejs-part-2-zurb-foundation/

it seems way foundation integrates has changed older versions, why updating foundation in existing yeoman-foundation generator prevents working.

it may you're missing the:

{exports: 'foundation'} 

from shim... test out soon!


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -