verisass
Verify that your sass functions generate the css you expect.
Last updated 7 years ago by thlorenz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install verisass 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.1.1                                ...           latest (7 years ago)

2 Versions

  • 0.1.1                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (1)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |