From 014e22563a9c7b1b92cd8b7e2a0150615bd9eac0 Mon Sep 17 00:00:00 2001 From: ZiBY Date: Sat, 7 Jul 2018 15:29:40 +0300 Subject: [PATCH] Update --- index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 52bce8d..5cab9d9 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,11 @@ +var path = require('path'); var stylus = require('stylus'); -var fs = require('fs'); -var stFunctions = fs.readFileSync('./node_modules/stylus/lib/functions/index.styl', 'utf-8'); +stylus.nodes.filename = path.resolve(__dirname, '../stylus/lib/functions/index.styl'); + +var options = { + root: new stylus.nodes.Block +}; var options = {}; @@ -41,7 +45,6 @@ var removeRoundBrackets = function(string) { }; var expressionsToObject = function(content) { - content = stFunctions + content; var obj = {}; var astC = new stylus.Parser(content, options).parse();