2013-02-24 30 views
7

'u oluştururken, Twitter Bootstrap'in yerel olarak özelleştirilmiş sürümlerini oluşturmak için ortamı kurdum ve yapılandırdım.Hatalı seçenek: '; _;' Twitter Bootstrap

Bu ne yaptım:

  1. Bootstrap derlemeye az
  2. klon Bootstrap lokal
  3. koşmak make build yükleyin
  4. npm yükleyin düğümünü
  5. yükleyin

Adım 5 :

~/devel/parking/bootstrap$ make build 
jshint js/*.js --config js/.jshintrc 

js/bootstrap-affix.js: line 23, col 17, Bad option: ';_;'. 
js/bootstrap-alert.js: line 23, col 17, Bad option: ';_;'. 
js/bootstrap-button.js: line 23, col 17, Bad option: ';_;'. 
js/bootstrap-carousel.js: line 23, col 17, Bad option: ';_;'. 
js/bootstrap-collapse.js: line 23, col 17, Bad option: ';_;'. 
js/bootstrap-dropdown.js: line 23, col 17, Bad option: ';_;'. 
js/bootstrap-modal.js: line 23, col 17, Bad option: ';_;'. 
js/bootstrap-popover.js: line 23, col 17, Bad option: ';_;'. 
js/bootstrap-scrollspy.js: line 23, col 17, Bad option: ';_;'. 
js/bootstrap-tab.js: line 23, col 17, Bad option: ';_;'. 
js/bootstrap-tooltip.js: line 24, col 17, Bad option: ';_;'. 
js/bootstrap-transition.js: line 23, col 17, Bad option: ';_;'. 
js/bootstrap-typeahead.js: line 23, col 17, Bad option: ';_;'. 

13 errors 
make: *** [test] Error 2 

Hat 23: Satır 23. gerçi gelen // jshint ;_; kaldırarak sorunu çözmek başardı

"use strict"; // jshint ;_; 

, ben bakir Bootstrap kaynaklarını bırakmayı tercih ederim.

Bu hatalardan nasıl kurtulabilirim ve "Hatalı seçenek" hatası ne anlama geliyor?/.jshintrc


js:

{ 
    "validthis": true, 
    "laxcomma" : true, 
    "laxbreak" : true, 
    "browser" : true, 
    "eqnull" : true, 
    "debug" : true, 
    "devel" : true, 
    "boss"  : true, 
    "expr"  : true, 
    "asi"  : true 
} 

cevap

4

ben önyükleme sorunu arama yaptıktan sonra, şimdi aynı hatayı buluştu,

Ben bunlara bakmak lütfen çözüm buldu: https://github.com/twitter/bootstrap/pull/5244 https://github.com/twitter/bootstrap/issues/7043

+0

Teşekkürler. [Makefile] (https://raw.github.com/ahockersten/bootstrap/10e8efe3cfa1c839abe71bc0cd45076a095d2a09/Makefile) [bu çekme isteği] 'de başvuruda bulundum (https://github.com/twitter/bootstrap/pull/7022/files). Ayrıca, yolumu yansıtmak için BIN_PREFIX değerini değiştirdim ancak sorun devam ediyor. – Paolo

+2

Bu bağlantıdan bazı detayları cevabınıza ekleyebilir misiniz? Sadece bağlantıların bağlanması,/link bittiğinde faydalı olmaz. – slm

+1

Nedenini bilmiyorum ama global olarak kurulu jshint'i kullanamıyor gibi görünüyor. Bu URL'den yama kullanıyorum : https: //github.com/twitter/bootstrap/pull/5344/files , bağlantınız sürüm 3 içindir.0。 Ön yükleme yapmadan önce önyükleme klasöründeki efPefefile , ust , , , , n n n n n n n n n n n n n n n n n local local local local local local local local local local local local – boilingbit

17

Sorun şu ki JSHint'in En son sürüm geçerli Bootstrap Makefile ile uyumlu değil, çünkü önceki sessiz uyarılar artık hatalar atıyor.

JSHint npm uninstall jshint öğesini kaldırdıktan sonra 0.9.1 npm install [email protected] sürümünü yükleyin. Sonunda make çalıştırın ve başarıyla derler.

+4

Ayrıca doğru uglify sürümüne ihtiyacınız var: https://groups.google.com/forum/?fromgroups=#!topic/twitter-bootstrap/cFy3J0nhfwM – benoitr

+3

npm install uglify-js @ 1 –

3

JSHint'i kaldırmak sadece benim için yapmadı. İşte ben this advice'u takip ettim.

cd bootstrap 
npm uninstall -g uglify-js jshint recess connect 
npm uninstall uglify-js jshint recess connect 
npm install 
mkdir bin 
cd bin 
ln -s ../node_modules/*/bin/* . ; ln -s hint jshint 
cd .. 
export PATH=$PATH:$PWD/bin 

bu Temizle sadece çalıştırdıktan sonra:

make 

veya başka bir marka direktifi.

+0

Çok teşekkür ederim! Bootstrap 3 hiç bir makefile sahip görünmüyor :( – Prasanth

+0

Bunu yapmak, son bootstrap dosyaları nerede?, Derlenmiş dosyaları kastediyorum –