Skip to content

Commit

Permalink
Replace sass-spec submodule with the npm package
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyfer committed Jan 28, 2017
1 parent 39c9783 commit 50c21ea
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "A tokenzier for Sass' SCSS syntax",
"main": "index.js",
"scripts": {
"test": "git submodule update --init && node test/sass-spec.js"
"test": "node test/sass-spec.js"
},
"repository": {
"type": "git",
Expand All @@ -30,6 +30,7 @@
},
"devDependencies": {
"glob": "^5.0.10",
"sass-spec": "^3.5.0-1",
"tripwire": "^0.10.0"
}
}
1 change: 0 additions & 1 deletion test/sass-spec
Submodule sass-spec deleted from d1cbee
14 changes: 11 additions & 3 deletions test/sass-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
// -----------------------------------------------------------------------------

var fs = require('fs');
var path = require('path');
var glob = require('glob');
var tripwire = require('tripwire');
var spec = require('sass-spec');
var scss = require('../');

var contents, file, i;
var timeout = 3000;
var contents, file, errorFile, i;
var fails = [];
var files = glob.sync('./test/sass-spec/spec/**/input.scss');
var files = glob.sync(path.join(spec.dirname, 'spec/**/input.scss'));

// -----------------------------------------------------------------------------
// We use tripwire to detect a long running process. If the process runs too
Expand All @@ -35,6 +37,12 @@ tripwire.resetTripwire(timeout, {});

for(i = 0; i < files.length; i++) {
file = files[i];
var contents = fs.readFileSync(file, { encoding: 'utf8' });
errorFile = path.join(path.dirname(file), 'error');

try {
if (fs.statSync(errorFile)) continue;
} catch (e) { }

contents = fs.readFileSync(file, { encoding: 'utf8' });
scss.tokenize(contents);
}

0 comments on commit 50c21ea

Please sign in to comment.