Commit 769d2828 by Adeel

Code: Mics. formattings.

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