Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

How to implement dependecy for not global module

$
0
0
I have an application in which I should include several bootstrap modules, so I have a bootstrap.js module:
  1. require('bower_components/bootstrap/js/bootstrap-tab')
  2. require('bower_components/bootstrap/js/bootstrap-modal')
  3. require('bower_components/bootstrap/js/bootstrap-dropdown')
  4. require('bower_components/bootstrap/js/bootstrap-tooltip')
  5. require('bower_components/bootstrap/js/bootstrap-alert')
  6. require('bower_components/bootstrap/js/bootstrap-popover')
I need jquery module to be loaded prior all this files, these modules are global files, but this bootstrap.js module is CJS

Currently I understand only one way to set jquery as dependcy for all this files in stealconfig.js:

  1. meta: {
  2.         'jquery': {exports: 'jQuery'},
  3.         'bower_components/bootstrap/js/bootstrap-tab': {deps: ['jquery']},
  4.         'bower_components/bootstrap/js/bootstrap-modal': {deps: ['jquery']},
  5.         'bower_components/bootstrap/js/bootstrap-dropdown': {deps: ['jquery']},
  6.         'bower_components/bootstrap/js/bootstrap-tooltip': {deps: ['jquery']},
  7.         'bower_components/bootstrap/js/bootstrap-alert': {deps: ['jquery']},
  8.         'bower_components/bootstrap/js/bootstrap-popover': {deps: ['jquery']},
  9. },
What is the better way to implement jquery dependency for all this files?

Viewing all articles
Browse latest Browse all 3491

Trending Articles