Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Code: Reverted #763 #809

Merged
merged 1 commit into from
Mar 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 46 additions & 31 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,42 @@
'src/custom_function_bridge.cpp',
'src/custom_importer_bridge.cpp',
'src/sass_context_wrapper.cpp',
'src/libsass/ast.cpp',
'src/libsass/base64vlq.cpp',
'src/libsass/bind.cpp',
'src/libsass/cencode.c',
'src/libsass/constants.cpp',
'src/libsass/context.cpp',
'src/libsass/contextualize.cpp',
'src/libsass/cssize.cpp',
'src/libsass/emitter.cpp',
'src/libsass/error_handling.cpp',
'src/libsass/eval.cpp',
'src/libsass/expand.cpp',
'src/libsass/extend.cpp',
'src/libsass/file.cpp',
'src/libsass/functions.cpp',
'src/libsass/inspect.cpp',
'src/libsass/json.cpp',
'src/libsass/node.cpp',
'src/libsass/output.cpp',
'src/libsass/parser.cpp',
'src/libsass/plugins.cpp',
'src/libsass/position.cpp',
'src/libsass/prelexer.cpp',
'src/libsass/remove_placeholders.cpp',
'src/libsass/sass.cpp',
'src/libsass/sass2scss.cpp',
'src/libsass/sass_context.cpp',
'src/libsass/sass_functions.cpp',
'src/libsass/sass_util.cpp',
'src/libsass/sass_values.cpp',
'src/libsass/source_map.cpp',
'src/libsass/to_c.cpp',
'src/libsass/to_string.cpp',
'src/libsass/units.cpp',
'src/libsass/utf8_string.cpp',
'src/libsass/util.cpp',
'src/sass_types/boolean.cpp',
'src/sass_types/color.cpp',
'src/sass_types/error.cpp',
Expand All @@ -21,38 +57,17 @@
'include_dirs': [
'<!(node -e "require(\'nan\')")',
],
'cflags!': [
'-fno-exceptions'
],
'cflags_cc!': [
'-fno-exceptions'
],
'cflags_cc': [
'-fexceptions',
'-frtti'
],
'conditions': [
['libsass_ext == ""', {
'dependencies': [
'libsass.gyp:libsass',
]
}],
['libsass_ext == "auto"', {
'cflags_cc': [
'<!(pkg-config --cflags libsass)',
],
'link_settings': {
'ldflags': [
'<!(pkg-config --libs-only-other --libs-only-L libsass)',
],
'libraries': [
'<!(pkg-config --libs-only-l libsass)',
],
}
}],
['libsass_ext == "yes"', {
'cflags_cc': [
'<(libsass_cflags)',
],
'link_settings': {
'ldflags': [
'<(libsass_ldflags)',
],
'libraries': [
'<(libsass_library)',
],
}
}],
['OS=="mac"', {
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"bin",
"binding.gyp",
"lib",
"libsass.gyp",
"scripts",
"src"
],
Expand Down
5 changes: 1 addition & 4 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ 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) {
return ['--', subject, '=', process.env[subject.toUpperCase()] || ''].join('');
})).concat(options.args);
var args = [path.join('node_modules', 'pangyp', 'bin', 'node-gyp'), 'rebuild'].concat(options.args);

console.log(['Building:', process.sass.runtime.execPath].concat(args).join(' '));

Expand Down
1 change: 0 additions & 1 deletion src/custom_function_bridge.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <nan.h>
#include "custom_function_bridge.h"
#include <sass_context.h>
#include "sass_types/factory.h"

Sass_Value* CustomFunctionBridge::post_process_return_value(Handle<Value> val) const {
Expand Down
2 changes: 1 addition & 1 deletion src/custom_function_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#define CUSTOM_FUNCTION_BRIDGE_H

#include <nan.h>
#include "libsass/sass_context.h"
#include "callback_bridge.h"
#include <sass_context.h>


using namespace v8;
Expand Down
1 change: 0 additions & 1 deletion src/custom_importer_bridge.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <nan.h>
#include <sass_context.h>
#include "custom_importer_bridge.h"
#include "create_string.h"

Expand Down
2 changes: 1 addition & 1 deletion src/custom_importer_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define CUSTOM_IMPORTER_BRIDGE_H

#include <nan.h>
#include <sass_context.h>
#include "libsass/sass_context.h"
#include "callback_bridge.h"


Expand Down
2 changes: 1 addition & 1 deletion src/sass_context_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <nan.h>
#include <stdlib.h>
#include <condition_variable>
#include <sass_context.h>
#include "libsass/sass_context.h"
#include "custom_function_bridge.h"
#include "custom_importer_bridge.h"

Expand Down
2 changes: 0 additions & 2 deletions src/sass_types/boolean.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include <nan.h>
#include <sass_values.h>
#include "boolean.h"
#include "sass_value_wrapper.h"

using namespace v8;

Expand Down
8 changes: 3 additions & 5 deletions src/sass_types/boolean.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
#define SASS_TYPES_BOOLEAN_H

#include <nan.h>
#include <sass_values.h>
#include "value.h"
#include "sass_value_wrapper.h"


namespace SassTypes
namespace SassTypes
{
using namespace v8;

class Boolean : public Value {
public:
static Boolean& get_singleton(bool);
Expand All @@ -32,5 +31,4 @@ namespace SassTypes
};
}


#endif
2 changes: 0 additions & 2 deletions src/sass_types/color.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include <nan.h>
#include <sass_values.h>
#include "color.h"
#include "sass_value_wrapper.h"

using namespace v8;

Expand Down
7 changes: 2 additions & 5 deletions src/sass_types/color.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
#define SASS_TYPES_COLOR_H

#include <nan.h>
#include <sass_values.h>
#include "sass_value_wrapper.h"


namespace SassTypes
namespace SassTypes
{
using namespace v8;

class Color : public SassValueWrapper<Color> {
public:
Color(Sass_Value*);
Expand All @@ -29,5 +27,4 @@ namespace SassTypes
};
}


#endif
2 changes: 0 additions & 2 deletions src/sass_types/error.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include <nan.h>
#include <sass_values.h>
#include "error.h"
#include "../create_string.h"
#include "sass_value_wrapper.h"

using namespace v8;

Expand Down
6 changes: 2 additions & 4 deletions src/sass_types/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
#define SASS_TYPES_ERROR_H

#include <nan.h>
#include <sass_values.h>
#include "sass_value_wrapper.h"


namespace SassTypes
namespace SassTypes
{
using namespace v8;

class Error : public SassValueWrapper<Error> {
public:
Error(Sass_Value*);
Expand Down
1 change: 0 additions & 1 deletion src/sass_types/factory.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <nan.h>
#include "factory.h"
#include <sass_values.h>
#include "value.h"
#include "number.h"
#include "string.h"
Expand Down
2 changes: 1 addition & 1 deletion src/sass_types/factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define SASS_TYPES_FACTORY_H

#include <nan.h>
#include <sass_values.h>
#include "../libsass/sass_values.h"
#include "value.h"

namespace SassTypes
Expand Down
2 changes: 0 additions & 2 deletions src/sass_types/list.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include <nan.h>
#include <sass_values.h>
#include "list.h"
#include "sass_value_wrapper.h"

using namespace v8;

Expand Down
6 changes: 2 additions & 4 deletions src/sass_types/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
#define SASS_TYPES_LIST_H

#include <nan.h>
#include <sass_values.h>
#include "sass_value_wrapper.h"


namespace SassTypes
namespace SassTypes
{
using namespace v8;

class List : public SassValueWrapper<List> {
public:
List(Sass_Value*);
Expand Down
2 changes: 0 additions & 2 deletions src/sass_types/map.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include <nan.h>
#include <sass_values.h>
#include "map.h"
#include "sass_value_wrapper.h"

using namespace v8;

Expand Down
6 changes: 2 additions & 4 deletions src/sass_types/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
#define SASS_TYPES_MAP_H

#include <nan.h>
#include <sass_values.h>
#include "sass_value_wrapper.h"


namespace SassTypes
namespace SassTypes
{
using namespace v8;

class Map : public SassValueWrapper<Map> {
public:
Map(Sass_Value*);
Expand Down
2 changes: 0 additions & 2 deletions src/sass_types/null.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include <nan.h>
#include <sass_values.h>
#include "null.h"
#include "sass_value_wrapper.h"

using namespace v8;

Expand Down
7 changes: 2 additions & 5 deletions src/sass_types/null.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
#define SASS_TYPES_NULL_H

#include <nan.h>
#include <sass_values.h>
#include "value.h"


namespace SassTypes
namespace SassTypes
{
using namespace v8;

class Null : public Value {
public:
static Null& get_singleton();
Expand All @@ -30,5 +28,4 @@ namespace SassTypes
};
}


#endif
2 changes: 0 additions & 2 deletions src/sass_types/number.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include <nan.h>
#include <sass_values.h>
#include "number.h"
#include "../create_string.h"
#include "sass_value_wrapper.h"

using namespace v8;

Expand Down
6 changes: 2 additions & 4 deletions src/sass_types/number.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
#define SASS_TYPES_NUMBER_H

#include <nan.h>
#include <sass_values.h>
#include "sass_value_wrapper.h"


namespace SassTypes
namespace SassTypes
{
using namespace v8;

class Number : public SassValueWrapper<Number> {
public:
Number(Sass_Value*);
Expand Down
9 changes: 4 additions & 5 deletions src/sass_types/sass_value_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
#include <stdexcept>
#include <vector>
#include <nan.h>
#include <sass_values.h>
#include "value.h"
#include "factory.h"

namespace SassTypes
namespace SassTypes
{
using namespace v8;

Expand Down Expand Up @@ -43,7 +42,7 @@ namespace SassTypes

template <class T>
SassValueWrapper<T>::SassValueWrapper(Sass_Value* v) {
this->value = sass_clone_value(v);
this->value = sass_clone_value(v);
}

template <class T>
Expand All @@ -53,8 +52,8 @@ namespace SassTypes
}

template <class T>
Sass_Value* SassValueWrapper<T>::get_sass_value() {
return sass_clone_value(this->value);
Sass_Value* SassValueWrapper<T>::get_sass_value() {
return sass_clone_value(this->value);
}

template <class T>
Expand Down
Loading