verisass

0.1.1 • Public • Published

verisass

Verify that your sass functions generate the css you expect.

ve·ri·tas/wey-ri-tahs/ meaning truth, was the goddess of truth, a daughter of Saturn and the mother of Virtue.

var verisass = require('verisass');

verisass(path.join(fixtures, 'add-fn.scss'))
  .run('x { x: add(1px, 2px)}', function (err, css, lines) {
    console.log('css:', css);
    console.log('lines:', lines);
  });

Output

css: x {
  x: 3px;
}
lines: [ 'x {', '  x: 3px;', '}' ]

Installation

npm install verisass

API

verisass(scssFile) → {Object}

Creates a verisass instance used to test functins inside the given scss file.

Parameters:
Name Type Description
scssFile String

full path to the scss file whose functions to test

Source:
Returns:

verisass instance

Type
Object

verisass.run(scssSrc, cb)

Uses the functions defined in the given scss file together with the scss source to compile CSS that can be tested for validity.

Parameters:
Name Type Description
scssSrc String

scss that causes the sass functions to execute and CSS to be generated

cb function

called back with the generated CSS or an error

Source:

generated with docme

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i verisass

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • thlorenz