forked from playframework/playframework
-
Notifications
You must be signed in to change notification settings - Fork 0
Tips
tmbrggmn edited this page Feb 26, 2012
·
20 revisions
- Build Play from last sources (near RC3) (Since less version has been updated to 1.2 )
- Copy bootstrap's less files into
app/assets/stylesheets/bootstrap - Add
bootstrap/_before eachbootstrap.lessimport declaration and rename each file the same way ( This is the convention to not compile theses files while packaging compiled assets ) - Move
bootstrap.lessfile intoapp/assets/stylesheets
This can be done with a script like this (run in app/assets/stylesheets/bootstrap)
for a in *.less; do mv $a _$a; done
sed -i '|s|@import "|@import "bootstrap/_|' bootstrap.less
mv bootstrap.less ../bootstrap.less`-
Copy bootstrap's less files into
app/assets/stylesheets/bootstrap -
Modify the
project/Build.scalafile to filter out the Bootstrap LESS files we don't want to compile:- Define a new BuildPath resolver function
// Only compile the bootstrap bootstrap.less file and any other *.less file in the stylesheets directory
def customLessEntryPoints(base: File): PathFinder = (
(base / "app" / "assets" / "stylesheets" / "bootstrap" * "bootstrap.less") +++
(base / "app" / "assets" / "stylesheets" * "*.less")
)
* Override the default `lessEntryPoints` setting key with the new function
val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
lessEntryPoints <<= baseDirectory(customLessEntryPoints)
)
* Include the `bootstrap.min.css` file in your view(s):
<link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/bootstrap/bootstrap.min.css")" />