gulp-core-build-sass
TypeScript JavaScript

README.md

gulp-core-build-sass npm version

Build Status Dependencies

gulp-core-build-sass is a plugin for gulp-core-build which introduces the ability to compile SASS files to CSS.

Tasks

SassTask

Description

This task invokes gulp-sass to compile source SASS files into a CommonJS module which uses load-themed-styles to load styles onto the page. If the libAmdFolder is specified globally, this task will also output an AMD module. Various templates may be specified.

Config

 interface ISassTaskConfig {
  sassMatch?: string[];
  commonModuleTemplate: string;
  amdModuleTemplate: string;
}

Usage (and defaults):

sass.setConfig({
  sassMatch: [
    'src/**/*.scss'
  ],
  commonModuleTemplate: "require('load-themed-styles').loadStyles(<%= content %>);",
  amdModuleTemplate: "define(['load-themed-styles'], function(loadStyles) { loadStyles.loadStyles(<%= content %>); });"
});