sass-vibe ~develop
Support for Sass, an extension to CSS. Before using sass-vibe, make sure you have Sass itself installed (gem install sass).
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
sass-vibe
sass-vibe brings SASS to vibe.d applications. SASS creates a superset over CSS to enable better stylesheet development, with features such as named variables and macros.
Installation
- Install SASS itself, either through RubyGems or your operating system's software management system.
- Add "sass-vibe":">=0.2.0" to your application's dependencies.
Usage
First you will need to add a call to compile your stylesheets using SASS. Import the 'sass' module, then simply invoke compileSass() with two arguments. The first is the directory where '.scss' files will be found, and the second is the name of the file you want to compile into CSS. Finally, make sure you are serving the files. For example, if you have a file "assets/styles/site.scss" you might do this:
module app;
import vibe.d;
import sass;
static this () {
// ...
compileSass( "./assets/styles/", "site" );
// ...
router.get( "*", serveStaticFiles( "./assets/" ) );
// ...
}
This will throw a SassException on failure. The stylesheet is linked as normal in your view files.
!!! 5
html
head
title #{ title }
link( href="/styles/site.css", rel="stylesheet", type="text/css" );
body
block body
- Registered by Christopher Nicholson-Sauls
- ~develop released 12 years ago
- csauls/sass-vibe
- github.com/csauls/sass-vibe
- Authors:
- Dependencies:
- none
- Versions:
-
0.2.0 2012-May-21 ~master 2013-Dec-06 ~develop 2012-May-21 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
467 downloads total
-
- Score:
- 1.1
- Short URL:
- sass-vibe.dub.pm