2014-02-26 43 views
1

我想在使用Bower進行依賴管理和gulp.js進行builingding文件的項目中使用Fuel UI微調器。燃料UI未捕獲ReferenceError:定義未定義

這裏是我的代碼:

gulpfile.js:

... 
gulp.task('js', function() { 
    gulp 
     .src([ 
      'bower_components/jquery/jquery.js', 
      ... 
      ... 
      'bower_components/fuelux/dist/loader.min.js', 
      'bower_components/fuelux/dist/spinner.js', 
      'js/script.js' 
      ]) 
      ... 
     ... 
    ... 
... 

的script.js

jQuery(document).ready(function($) { 

    ... 
    $(".qty-spinner").spinner(); 
    ... 

} 

當我這樣做,我得到了以下錯誤:

Uncaught ReferenceError: define is not defined

回答

1

我使用自舉3 fuelux目前與BS3兼容,所以這看起來像是對這個問題的候選人。

0

這聽起來像你缺少一些庫,我猜RequireJS? 我看到燃油UX使用RequireJS

https://github.com/ExactTarget/fuelux#amd

+0

試圖避免AMD,如果我正在使用Gulp posisble。你可以看到我添加了loader.min.js,它可以在沒有Require的情況下工作。 –

+0

但是定義不應該被其他人使用,對吧? 試着看看你得到的錯誤,並從那裏去。 – AntouanK

相關問題