2016-07-29 18 views
8

'u içerir. Aurische CLI projemde Bootstrap'ı dahil etmeye çalışıyorum ve CSS ve JS iyi çalışıyor.Aurelia CLI, Bootstrap Glyphicons

Sahip olduğum tek sorun, glifoların yüklenecek font dosyaları gerektirmesidir.

Ben bu yapılandırmayı kullanın:

"dependencies": [ 
    { 
     "name": "bootstrap", 
     "path": "../node_modules/bootstrap/dist", 
     "main": "js/bootstrap.min", 
     "deps": ["jquery"], 
     "exports": "$", 
     "resources": [ 
      "css/bootstrap.min.css", 
      "fonts/glyphicons-halflings-regular.woff2" 
     ] 
    } 
] 

Ama bu satırı içeren bir hata alıyorum:

yolu: 'C: \ Users \ azgın \ Documents \ \ node_modules \ önyükleme \ dist formu \ fonts \ glyphicons-buçukluklara-regular.js'

yüzden .woff2 dosyası içerir rağmen Aurelia bir JS dosyası olarak içe çalışır. Bunu yapmak için ne yapabilirim? CSS iyi çalışıyor.

+0

Bununla oynayacağım ve r kontrol edeceğim çabuk iyileş. GitHub sorununu göndermeniz gerekebilir. –

cevap

2

.

Bu sorun, aurelia.json adresinde bir kopyalama eklenmesi ile çözülebilir.

aurelia.json- geçerli bir proje aurelia-cli tarafından oluşturulmuşsa, 0.25.0 veya daha

inşa bloğunda aşağıdaki ekleyin:

"bundles": [ ... ], 
"copyFiles": { 
    "node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2": "bootstrap/fonts", 
    "node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff": "bootstrap/fonts", 
    "node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf": "bootstrap/fonts" 
} 

ise proje eski bir CLI sürümü tarafından oluşturuldu, görevler klasörünün içinde kopya görevi oluşturmalısınız

, github bu yorum için build.js/ts görev fabioluz için


* kredi kopya görevi diyoruz