Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.
/ server-sass Public archive

A simple implementation of a compiler which transforms SASS to CSS files

License

Notifications You must be signed in to change notification settings

scireum/server-sass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

server-sass

A simple implementation of a compiler which transforms SASS to CSS files - without requiring you to include jRuby, JavaScript or other monsters.

The idea is to only implement those features of SASS, which we really need - but have these in superior quality. Therefore we have a test coverage of 80%+ of all lines using automated tests. If there is a missing feature, feel free to fork ;-)

For a good description on SASS go to: http://sass-lang.com

Using it is as simple as:

Generator gen = new Generator();
// Parses and expands test.scss - Files are resolved from the classpath, subclass Generator and
// override the resolve method, to change this behavior.
gen.importStylesheet("test.scss");
// Finalize expansions and evaluate expressions
gen.compile();
// Access css sources
StringWriter out = new StringWriter();
Output output = new Output(out, false);
gen.generate(output);
String css = out.toString();

If you also need a modern, rock solid web framework which has this module already built in, have a look at SIRIUS: https://sirius-lib.net (CSS is auto-generated for .scss files by the AssetsDispatcher: https://github.com/scireum/sirius-web/blob/master/src/main/java/sirius/web/dispatch/AssetsDispatcher.java#L168)

server-sass is part of the open source initiative of scireum GmbH (http://www.scireum.de)

Maven

server-sass is available under:

<dependency>
  <groupId>com.scireum</groupId>
  <artifactId>server-sass</artifactId>
  <version>4.1.2</version>
</dependency>

About

A simple implementation of a compiler which transforms SASS to CSS files

Resources

License

Stars

Watchers

Forks

Packages

No packages published