Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ready callback #80

Open
tadjik1 opened this issue May 25, 2015 · 0 comments
Open

ready callback #80

tadjik1 opened this issue May 25, 2015 · 0 comments

Comments

@tadjik1
Copy link

tadjik1 commented May 25, 2015

Привет. Пытаюсь использовать вашу библиотеку с requirejs.
Конфиг достаточно простой:

//config.js
require.config({
  "baseUrl": "js/",

  paths: {
      eventEmitter: './external/eventEmitter/eventEmitter',
      jquery: './external/jquery/jquery.min',
      lodash: './external/lodash/dist/lodash.compat.min',
      smartbox: './external/smartbox/dist/smartbox'
  },

  shim: {
    eventEmitter: {
      exports: 'EventEmitter'
    },

    smartbox: {
      deps: ['jquery', 'lodash', 'eventEmitter'],
      exports: 'SB'
    }
  },

  deps: ['main']
});
//main.js
define(function (require, exports, module) {
    'use strict';

    var SB = require('smartbox');

    SB(function () {
      console.log('ready');
    });
});

так вот надпись 'ready' показывается через раз. как такое возможно?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant