Commit b307957f by Adeel

Binding: Send output path to upstream. (#379)

parent a882994a
...@@ -50,6 +50,7 @@ void ExtractOptions(Local<Value> optionsValue, void* cptr, sass_context_wrapper* ...@@ -50,6 +50,7 @@ void ExtractOptions(Local<Value> optionsValue, void* cptr, sass_context_wrapper*
if (isFile) { if (isFile) {
sass_file_context* ctx = (sass_file_context*) cptr; sass_file_context* ctx = (sass_file_context*) cptr;
ctx->input_path = CreateString(options->Get(NanNew("file"))); ctx->input_path = CreateString(options->Get(NanNew("file")));
ctx->output_path = CreateString(options->Get(NanNew("outFile")));
ctx->options.image_path = CreateString(options->Get(NanNew("imagePath"))); ctx->options.image_path = CreateString(options->Get(NanNew("imagePath")));
ctx->options.output_style = options->Get(NanNew("style"))->Int32Value(); ctx->options.output_style = options->Get(NanNew("style"))->Int32Value();
ctx->options.source_comments = source_comments = options->Get(NanNew("comments"))->Int32Value(); ctx->options.source_comments = source_comments = options->Get(NanNew("comments"))->Int32Value();
...@@ -61,6 +62,7 @@ void ExtractOptions(Local<Value> optionsValue, void* cptr, sass_context_wrapper* ...@@ -61,6 +62,7 @@ void ExtractOptions(Local<Value> optionsValue, void* cptr, sass_context_wrapper*
} else { } else {
sass_context* ctx = (sass_context*) cptr; sass_context* ctx = (sass_context*) cptr;
ctx->source_string = CreateString(options->Get(NanNew("data"))); ctx->source_string = CreateString(options->Get(NanNew("data")));
ctx->output_path = CreateString(options->Get(NanNew("outFile")));
ctx->options.image_path = CreateString(options->Get(NanNew("imagePath"))); ctx->options.image_path = CreateString(options->Get(NanNew("imagePath")));
ctx->options.output_style = options->Get(NanNew("style"))->Int32Value(); ctx->options.output_style = options->Get(NanNew("style"))->Int32Value();
ctx->options.source_comments = source_comments = options->Get(NanNew("comments"))->Int32Value(); ctx->options.source_comments = source_comments = options->Get(NanNew("comments"))->Int32Value();
......
...@@ -12,6 +12,7 @@ function render(options, emitter) { ...@@ -12,6 +12,7 @@ function render(options, emitter) {
sourceComments: options.sourceComments, sourceComments: options.sourceComments,
sourceMap: options.sourceMap, sourceMap: options.sourceMap,
precision: options.precision, precision: options.precision,
outFile: options.outFile,
success: function(css, sourceMap) { success: function(css, sourceMap) {
var todo = 1; var todo = 1;
......
...@@ -7,6 +7,7 @@ extern "C" { ...@@ -7,6 +7,7 @@ extern "C" {
void free_context(sass_context* ctx) { void free_context(sass_context* ctx) {
delete[] ctx->source_string; delete[] ctx->source_string;
delete[] ctx->output_path;
delete[] ctx->options.include_paths; delete[] ctx->options.include_paths;
delete[] ctx->options.image_path; delete[] ctx->options.image_path;
sass_free_context(ctx); sass_free_context(ctx);
......
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