Skip to content

Commit

Permalink
Update and clean style
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed Mar 13, 2013
1 parent 913a2b4 commit 66bac30
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/type-utils.js
Expand Up @@ -2,7 +2,7 @@ var plugin = module.exports = function plugin () {
'use strict';

return function (style) {
style.import(__dirname + '/type-utils');
style.include(__dirname);
};
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -28,6 +28,6 @@
"stylus": "0.x"
},
"devDependencies": {
"stylus": "~0.32.0"
"stylus": "~0.32.1"
}
}
14 changes: 6 additions & 8 deletions test/test.js
Expand Up @@ -2,30 +2,28 @@
'use strict';

// Stolen from https://github.com/visionmedia/nib/blob/master/test/runner.js

var fs = require('fs'),
stylus = require('stylus'),
typeUtils = require('../'),
assert = require('assert');


var cases = fs.readdirSync('test/cases').filter(function (file) {
return ~file.indexOf('.styl');
}).map(function (file) {
return file.replace('.styl', '');
});


describe('integration', function () {
cases.forEach(function (test) {
var name = test.replace(/[\-.]/g, ' ');
var name = test.replace(/[\-\.]/g, ' ');
it(name, function () {
var path = 'test/cases/' + test + '.styl';
var styl = fs.readFileSync(path, 'utf8').replace(/\r/g, '');
var css = fs.readFileSync('test/cases/' + test + '.css', 'utf8').replace(/\r/g, '').trim();
var path = 'test/cases/' + test + '.styl',
styl = fs.readFileSync(path, 'utf8').replace(/\r/g, ''),
css = fs.readFileSync('test/cases/' + test + '.css', 'utf8').replace(/\r/g, '').trim();

var style = stylus(styl)
.use(typeUtils())
.import('type-utils')
.set('filename', path)
.define('url', stylus.url());

Expand All @@ -37,4 +35,4 @@ describe('integration', function () {
});
});
});
});
});

0 comments on commit 66bac30

Please sign in to comment.