Commit 51d3d500 by Andrew Nesbitt

Getting closer

parent 2ace445d
#include <v8.h>
#include <node.h>
#include "libsass/sass_interface.h"
using namespace v8;
Handle<Value> Render(const Arguments& args) {
HandleScope scope;
Local<String> result = args[0]->ToString();
struct sass_context* ctx = sass_new_context();
return scope.Close(result);
ctx->input_string = args[0]->ToString();
ctx->options.output_style = SASS_STYLE_NESTED;
sass_compile(ctx);
return scope.Close(String::New(ctx->output_string));
}
void RegisterModule(v8::Handle<v8::Object> target) {
......
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