【发布时间】:2015-12-15 23:22:57
【问题描述】:
我需要将 grails 2.4.4 应用程序迁移到 Grails 3.0.9。谁能解释一下如何配置 twitter bootstrap 插件以及如何使用它。
【问题讨论】:
-
非常感谢任何有效的 build.gradle 依赖项和 application.yml 条目。
标签: twitter-bootstrap grails-3.0
我需要将 grails 2.4.4 应用程序迁移到 Grails 3.0.9。谁能解释一下如何配置 twitter bootstrap 插件以及如何使用它。
【问题讨论】:
标签: twitter-bootstrap grails-3.0
After placing the following dependencies in build.gradle: it worked.
build.gradle:
compile 'org.webjars:bootstrap:3.3.5'
compile "org.grails:grails-web-boot"
compile "org.webjars:typeaheadjs:0.11.1"
compile "org.webjars:bootstrap-tagsinput:0.5"
compile "org.webjars.bower:bootstrap-table:1.8.1"
application.js:
//= require jquery-2.1.3.js
//= require_tree .
//= require_self
//=require js/jquery-ui-1.10.4.custom.min.js
//=require bootstrap
//=require typeahead
///= require /webjars/bootstrap/3.3.5/js/bootstrap.min
//= require /webjars/bootstrap-tagsinput/0.5/bootstrap-tagsinput
//= require /webjars/typeaheadjs/0.11.1/typeahead.bundle.js
application.css:
*= require main
*= require mobile
*= require_self
*= require webjars/bootstrap/3.3.5/css/bootstrap-theme
*= require webjars/bootstrap/3.3.5/css/bootstrap
*= require webjars/bootstrap-tagsinput/0.5/bootstrap-tagsinput
in the gsp:
<g:layoutTitle default="main"/></title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<asset:stylesheet src="application.css"/>
<asset:javascript src="application.js"/>
<asset:javascript src="boo.js"/>
<asset:javascript src="jquery-ui.js"/>
<g:layoutHead/>
【讨论】: