From bfc92c26bcff49409e0a657ecac8938d69d46fb0 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Tue, 14 Jun 2011 15:01:11 -0400 Subject: [PATCH] Stubbing out assert, trying to get higher-level stylesheets --- lib/carto/tree/definition.js | 4 +++- test/index.html | 12 +++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/carto/tree/definition.js b/lib/carto/tree/definition.js index a8ab4ea..eebd788 100644 --- a/lib/carto/tree/definition.js +++ b/lib/carto/tree/definition.js @@ -1,5 +1,7 @@ (function(tree) { -var assert = require('assert'); +var assert = require('assert') || { + ok: function() { } +}; tree.Definition = function Definition(selector, rules) { this.elements = selector.elements; diff --git a/test/index.html b/test/index.html index eab51af..6007b6d 100644 --- a/test/index.html +++ b/test/index.html @@ -17,11 +17,13 @@ }; (new carto.Parser(parse_env)).parse(style, function(err, ruleset) { - for (var i in ruleset.rules) { - for (var j in ruleset.rules[i].rules) { - document.getElementById('output').innerHTML += ruleset.rules[i].rules[j].eval(parse_env).toXML(parse_env) + ' '; - } - } + var definition = ruleset.toList(parse_env); + console.log(definition); + // for (var i in ruleset.rules) { + // for (var j in ruleset.rules[i].rules) { + // document.getElementById('output').innerHTML += ruleset.rules[i].rules[j].eval(parse_env).toXML(parse_env) + ' '; + // } + // } }); }); }