🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ember-cli-sassjs

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-sassjs

Ember addon for Sass.js

0.3.3
latest
Source
npm
Version published
Weekly downloads
8
100%
Maintainers
1
Weekly downloads
 
Created
Source

ember-cli-sassjs

Ember addon for Sass.js from medialize.

Installation

ember install:addon ember-cli-sassjs

Usage

Import Sass from 'sassjs' wherever you need to run the compile function. Sass.js will initialize its worker the first time you include it.

Sass.compile() returns a promise, returning compiled css from the worker asynchronously.

For example:

...
import Sass from 'sassjs';

export default Ember.Controller.extend({
  actions: {
    convertSCSS: function(scss) {
      var _this = this;
      Sass.compile(scss).then(function(css) {
        _this.set('myCSS', css);
      });
    }
  }
});
...

Options

To use options, set them on the Sass object, and call your compile function afterwards:

Sass.options({
  // format output: nested, expanded, compact, compressed
  style: 'compressed',

  // add line comments to output: none, default
  comments: 'none'
});

Sass.compile(scss).then(function(css) {
  console.log(css);
});

Keywords

ember-addon

FAQs

Package last updated on 14 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts