Skip to content
Browse files

Fixed incorrect cssSelector file name

  • Loading branch information...
1 parent 98383ec commit f6ec4f3948b4a9193a452446aa888a4eb6e7df5b @bmavity committed Dec 7, 2011
Showing with 15 additions and 11 deletions.
  1. +6 −4 examples/tester.js
  2. +9 −7 src/index.js
View
10 examples/tester.js
@@ -1,8 +1,10 @@
-var sys = require('sys'),
- fs = require('fs'),
- scss = require('../src');
+var sys = require('sys')
+ , fs = require('fs')
+ , path = require('path')
+ , scss = require('../')
+ ;
-fs.readFile(__dirname + '/blog.scss', function(err, scssFile) {
+fs.readFile(path.join(__dirname, 'blog.scss'), function(err, scssFile) {
scss.parse(scssFile.toString(), function(err, css) {
if(err) {
sys.puts(sys.inspect(err));
View
16 src/index.js
@@ -1,19 +1,21 @@
-var sys = require('sys'),
- fs = require('fs'),
- ometa = require('ometa'),
- rule = 'scssFile',
- createdParser;
+var sys = require('sys')
+ , fs = require('fs')
+ , path = require('path')
+ , ometa = require('ometa')
+ , rule = 'scssFile'
+ , createdParser
+ ;
var fixReadFile = function(rawFile) {
return rawFile.slice(1).replace(/\\n/g, '\n');
};
var getParser = function(callback) {
if(!createdParser) {
- fs.readFile(__dirname + '/CssSelector.ometa', 'utf8', function(err, cssSelectorContents) {
+ fs.readFile(path.join(__dirname, '/CssSelector.ometa'), 'utf8', function(err, cssSelectorContents) {
var selectorFile = fixReadFile(cssSelectorContents);
ometa.createParser(selectorFile, function(err, cssSelectorParser) {
- fs.readFile(__dirname + '/scss.ometa', 'utf8', function(err, contents) {
+ fs.readFile(path.join(__dirname, '/scss.ometa'), 'utf8', function(err, contents) {
var contentFile = fixReadFile(contents);
if(err) {
callback(err);

0 comments on commit f6ec4f3

Please sign in to comment.
Something went wrong with that request. Please try again.