Sass compiler for AEM

Enable Sass support for Adobe Experience Manager

Лицензия

Лицензия

Группа

Группа

com.github.mickleroy
Идентификатор

Идентификатор

aem-sass-compiler
Последняя версия

Последняя версия

1.0.4
Дата

Дата

Тип

Тип

bundle
Описание

Описание

Sass compiler for AEM
Enable Sass support for Adobe Experience Manager
Ссылка на сайт

Ссылка на сайт

https://github.com/mickleroy/aem-sass-compiler
Система контроля версий

Система контроля версий

https://github.com/mickleroy/aem-sass-compiler

Скачать aem-sass-compiler

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
io.bit3 : jsass jar 5.7.3

provided (13)

Идентификатор библиотеки Тип Версия
org.osgi : org.osgi.core jar 4.2.0
org.osgi : org.osgi.compendium jar 4.2.0
org.apache.felix : org.apache.felix.scr.annotations jar 1.9.8
biz.aQute.bnd : annotation jar 2.3.0
javax.servlet : servlet-api jar 2.5
org.apache.commons : commons-lang3 jar 3.0.1
commons-lang : commons-lang jar 2.5
commons-codec : commons-codec jar 1.5
commons-io : commons-io jar 2.4
javax.servlet.jsp : jsp-api jar 2.1
javax.jcr : jcr jar 2.0
com.adobe.aem : uber-jar jar 6.2.0-SP1
org.slf4j : slf4j-api jar 1.7.6

test (4)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11
junit-addons : junit-addons jar 1.4
org.slf4j : slf4j-simple jar 1.7.6
org.mockito : mockito-all jar 1.10.19

Модули Проекта

Данный проект не имеет модулей.

Sass Compiler for AEM 6.1+

Build Status

This bundle provides support for the Sass CSS pre-processor in Adobe Experience Manager 6.1 or above.

Features

Supports all the latest features of Sass:

  • Variables
  • Nesting
  • Partials
  • Imports
  • Mixins
  • Inheritance
  • Operators

Examples of supported @import directives:

@import 'file';
@import 'file.scss';
@import 'partials/file';
@import 'partials/file.scss';
@import 'file1', 'file2';
@import '/etc/designs/aem-sass-compiler/clientlib/file';
@import '/etc/designs/aem-sass-compiler/clientlib/file.scss';

If any one of the conditions below are met, the @import will be skipped and compiled to a CSS @import:

  • The file’s extension is .css
  • The filename begins with http://
  • The filename is a url()
  • The @import has any media queries

Supported AEM versions

AEM Sass Compiler
6.3 1.0.x
6.2 1.0.x
6.1 (SP2 only) 0.9.x

Installation

Via Maven (preferred)

  • Add the following dependency to your POM:
<dependency>
    <groupId>com.github.mickleroy</groupId>
    <artifactId>aem-sass-compiler</artifactId>
    <version>1.0.1</version>
</dependency>

Note: replace "1.0.1" with the latest version of the compiler.

  • In your content-package-maven-plugin configuration, add an embedded entry for the compiler:
<plugin>
    <groupId>com.day.jcr.vault</groupId>
    <artifactId>content-package-maven-plugin</artifactId>
    <extensions>true</extensions>
    <configuration>
        <embeddeds>
            <embedded>
                <groupId>com.github.mickleroy</groupId>
                <artifactId>aem-sass-compiler</artifactId>
                <target>/apps/my-aem-project/install</target>
            </embedded>
        </embeddeds>
        <!-- other entries... -->
    </configuration>
</plugin>

Note: replace "/apps/my-aem-project/install" with your own project path.

Via Web Console

Install the provided OSGi bundle (.jar) in the latest release via the Web Console.

Usage

  • Start writing .scss files just like you would write .less files within AEM.
/etc/designs/clientlibs
├── css.txt
├── main.scss
└── partials
    └── _base.scss

The css.txt file should only reference your main Sass file:

#base=.
main.scss

Bundle Install Log

The following log entries should be visible when installing the bundle:

*INFO* [...] com.adobe.granite.ui.clientlibs.impl.CompilerProviderImpl Registering client library compiler scss
*INFO* [...] com.github.mickleroy.aem.sass.impl.SassCompilerImpl Activating Sass Compiler

Sass Compilation Log

Similar log entries should be visible when compiling a .scss file:

*INFO* [...] com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl Start building CSS library: /etc/designs/aem-sass-compiler/clientlib
*INFO* [...] com.github.mickleroy.aem.sass.impl.SassCompilerImpl Compiled Sass in 97ms
*INFO* [...] com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl finished building library /etc/designs/aem-sass-compiler/clientlib.css

Implementation Details

Currently support LibSass version 3.4.3.

LibSass is a C/C++ port of the original engine written in Ruby. More info at https://github.com/sass/libsass

jsass is a feature complete Java wrapper of LibSass (requires Java 8). More info at https://github.com/bit3/jsass

Release

Create a release branch off the master branch

git branch release/X.X.X

Prepare the release (use vX.X.X for the tag)

mvn release:prepare -DpushChanges=false

Push the changes to the repository

git push origin

Checkout the newly created tag and build the project

git checkout tags/vX.X.X
mvn clean package

Attach the jar to the release on Github and merge back to master.

Версии библиотеки

Версия
1.0.4
1.0.3
1.0.2
1.0.1
0.9.1
0.9.0