lib/csso/js/cssoapi.js in csso-rails-0.0.2 vs lib/csso/js/cssoapi.js in csso-rails-0.0.3

- old
+ new

@@ -1,11 +1,13 @@ var util = require('./util.js'), - parser = require('./parser.js'), + gonzales = require('./gonzales.cssp.node.js'), translator = require('./translator.js'), compressor = require('./compressor.js'); -var parse = exports.parse = parser.parse; +var parse = exports.parse = function(s, rule, needInfo) { + return gonzales.srcToCSSP(s, rule, needInfo); +}; var cleanInfo = exports.cleanInfo = util.cleanInfo; exports.treeToString = util.treeToString; @@ -13,8 +15,8 @@ var translate = exports.translate = translator.translate; var compress = exports.compress = compressor.compress; -exports.justDoIt = function(src, ro) { - return translate(cleanInfo(compress(parse(src, 'stylesheet'), ro))); +exports.justDoIt = function(src, ro, needInfo) { + return translate(cleanInfo(compress(parse(src, 'stylesheet', needInfo), ro))); };