2013-03-11 25 views
0

我想安裝一個項目來使用javascriptmvc和twitter bootstrap。我使用JavaScript mvc內置的應用程序生成器來創建文件結構,然後添加資源目錄。JavascriptMVC和Bootstrap

steal(
    './appname.css',   // application CSS file 
    './models/models.js',  // steals all your models 
    './fixtures/fixtures.js' // sets up fixtures for your models 
).then(
    './resources/bootstrap/css/bootstrap.min.css', 
    './resources/bootstrap/js/bootstrap.min.js', 
function() {     // configure your application 

    } 
) 

如同任何引導文件都被列入它不會出現:

-AppRoot 
    -documentjs 
    -funcunit 
    -jquery 
    -appname 
     -fixtures 
     -models 
     -resources 
      -css 
      -js 
      -img 
     . 
     . 
     . 
    -appname.html 
    -appname.js 

以便它的內容我已經配置我的appname.js。任何關於設置javascriptmvc和引導程序的想法/建議都將不勝感激。

回答

1

在你上面你提到的沒有一個引導程序文件夾中的文件結構,你有資源的根CSS,IMG和js直接,所以你應該包括你的文件,而該文件夾:

steal(
'./appname.css',   // application CSS file 
'./models/models.js',  // steals all your models 
'./fixtures/fixtures.js' // sets up fixtures for your models 
).then(
    './resources/css/bootstrap.min.css', 
    './resources/js/bootstrap.min.js', 
function() {     // configure your application 

    } 
) 

或者將css,img和js移動到引導文件夾中,以便包含工作。