2013-03-11 24 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移动到引导文件夹中,以便包含工作。