Skip to content
This repository has been archived by the owner on Jul 4, 2020. It is now read-only.

Commit

Permalink
Update to Sasstree 0.0.12.
Browse files Browse the repository at this point in the history
  • Loading branch information
DFurnes committed Aug 13, 2015
1 parent b4589df commit 0b18449
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bin/sasslint
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if(fs.existsSync(path.join(__dirname, '..', 'lib/Console.js'))) {
try {
require('../lib/Console');
} catch(e) {
console.error(chalk.red.bold('❯ ') + e);
console.error(chalk.red.bold('❯ ') + e.name + ': ' + e.message);
}
} else {
require('babel/register');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"commander": "^2.8.1",
"find-parent-dir": "^0.3.0",
"lodash": "^3.3.1",
"sasstree": "0.0.9",
"sasstree": "0.0.12",
"text-table": "^0.2.0"
},
"devDependencies": {
Expand Down
7 changes: 2 additions & 5 deletions src/Runner.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Parser from 'sasstree';
import sasstree from 'sasstree';
import forEach from 'lodash/collection/forEach';

/**
Expand Down Expand Up @@ -36,15 +36,12 @@ class Runner {
* @param {object} options
*/
lint(scss, options = {}) {
// Start a new SassTree parser
const parser = new Parser();

if(options && options.bench) {
console.time('SassTree');
}

// Get the AST for the given SCSS source
const ast = parser.parse(scss, { bench: options.bench });
const ast = sasstree.parse(scss, { bench: options.bench });

if(options && options.bench) {
console.timeEnd('SassTree');
Expand Down

0 comments on commit 0b18449

Please sign in to comment.