Commit 769d2828 by Adeel

Code: Mics. formattings.

parent 279d14bb
......@@ -32,7 +32,7 @@ module.exports = function(options, emitter) {
indentWidth: options.indentWidth,
indentType: options.indentType,
linefeed: options.linefeed
};
};
if (options.data) {
renderOptions.data = options.data;
......
......@@ -54,7 +54,7 @@
"npmconf": "^2.1.1",
"pangyp": "^2.1.0",
"request": "^2.53.0",
"sass-graph": "^1.0.3"
"sass-graph": "^1.2.0"
},
"devDependencies": {
"coveralls": "^2.11.2",
......
......@@ -53,15 +53,10 @@ function afterBuild(options) {
*/
function build(options) {
var args = [
path.join('node_modules', 'pangyp', 'bin', 'node-gyp'),
'rebuild',
].concat(
[ 'libsass_ext', 'libsass_cflags',
'libsass_ldflags', 'libsass_library' ].map(function(subject) {
var args = [path.join('node_modules', 'pangyp', 'bin', 'node-gyp'), 'rebuild'].concat(
['libsass_ext', 'libsass_cflags', 'libsass_ldflags', 'libsass_library'].map(function(subject) {
return ['--', subject, '=', process.env[subject.toUpperCase()] || ''].join('');
})
).concat(options.args);
})).concat(options.args);
console.log(['Building:', process.sass.runtime.execPath].concat(args).join(' '));
......
......@@ -3,7 +3,6 @@
#include <string.h>
#include "create_string.h"
char* create_string(Local<Value> value) {
if (value->IsNull() || !value->IsString()) {
return 0;
......
......@@ -3,7 +3,6 @@
#include <sass_context.h>
#include "sass_types/factory.h"
Sass_Value* CustomFunctionBridge::post_process_return_value(Handle<Value> val) const {
try {
return SassTypes::Factory::unwrap(val)->get_sass_value();
......
......@@ -3,7 +3,6 @@
#include "custom_importer_bridge.h"
#include "create_string.h"
SassImportList CustomImporterBridge::post_process_return_value(Handle<Value> val) const {
SassImportList imports;
NanScope();
......
......@@ -3,10 +3,8 @@
#include "boolean.h"
#include "sass_value_wrapper.h"
using namespace v8;
namespace SassTypes
{
Persistent<Function> Boolean::constructor;
......@@ -58,7 +56,8 @@ namespace SassTypes
if (constructor_locked) {
return NanThrowError(NanNew("Cannot instantiate SassBoolean"));
}
} else {
}
else {
if (args.Length() != 1 || !args[0]->IsBoolean()) {
return NanThrowError(NanNew("Expected one boolean argument"));
}
......
......@@ -20,10 +20,10 @@ namespace SassTypes
}
argb = raw_val[0]->ToInt32()->Value();
a = (double) ((argb >> 030) & 0xff) / 0xff;
r = (double) ((argb >> 020) & 0xff);
g = (double) ((argb >> 010) & 0xff);
b = (double) (argb & 0xff);
a = (double)((argb >> 030) & 0xff) / 0xff;
r = (double)((argb >> 020) & 0xff);
g = (double)((argb >> 010) & 0xff);
b = (double)(argb & 0xff);
break;
case 4:
......
......@@ -3,25 +3,20 @@
#include "null.h"
#include "sass_value_wrapper.h"
using namespace v8;
namespace SassTypes
{
Persistent<Function> Null::constructor;
bool Null::constructor_locked = false;
Null::Null() {}
Null& Null::get_singleton() {
static Null singleton_instance;
return singleton_instance;
}
Handle<Function> Null::get_constructor() {
if (constructor.IsEmpty()) {
Local<FunctionTemplate> tpl = NanNew<FunctionTemplate>(New);
......@@ -41,17 +36,14 @@ namespace SassTypes
return NanNew(constructor);
}
Sass_Value* Null::get_sass_value() {
return sass_make_null();
}
Local<Object> Null::get_js_object() {
return NanNew(this->js_object);
}
NAN_METHOD(Null::New) {
NanScope();
......@@ -59,7 +51,8 @@ namespace SassTypes
if (constructor_locked) {
return NanThrowError(NanNew("Cannot instantiate SassNull"));
}
} else {
}
else {
NanReturnValue(NanNew(get_singleton().get_js_object()));
}
......
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