Commit 34194da4 by Andrew Nesbitt

It works!

parent e36a80f3
......@@ -6,13 +6,12 @@ using namespace v8;
Handle<Value> Render(const Arguments& args) {
HandleScope scope;
struct sass_context* ctx = sass_new_context();
String::AsciiValue astr(args[0]);
char * cs = *astr;
ctx->input_string = cs;
ctx->options.include_paths = 0;
ctx->options.output_style = SASS_STYLE_NESTED;
sass_compile(ctx);
......
......@@ -11,7 +11,7 @@ CPP_FILES = \
prelexer.cpp
libsass: libsass_objs
ar rvs libsass.a \
ar rs libsass.a \
sass_interface.o \
context.o \
functions.o \
......
var sass = require('./sass')
sass.render('something')
\ No newline at end of file
var sass = require('./sass');
console.log(sass.render('#navbar {\
width: 80%;\
height: 23px; }\
#navbar ul {\
list-style-type: none; }\
#navbar li {\
float: left;\
a {\
font-weight: bold; }}'))
\ No newline at end of file
......@@ -12,9 +12,12 @@ def set_options(opt):
def configure(conf):
conf.check_tool("compiler_cxx")
conf.check_tool("node_addon")
conf.check(staticlib='sass', uselib_store='LIB_SASS', cpppath='./libsass/')
def build(bld):
obj = bld.new_task_gen("cxx", "shlib", "node_addon")
obj.uselib = "sass"
obj.target = "binding"
obj.source = "binding.cpp "
obj.use = ['LIB_SASS']
obj.add_obj_file("./libsass/libsass.a")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment