Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sass
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
楚学文
node-sass
Commits
34194da4
Commit
34194da4
authored
Apr 27, 2012
by
Andrew Nesbitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
It works!
parent
e36a80f3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
6 deletions
+16
-6
binding.cpp
binding.cpp
+1
-2
Makefile
libsass/Makefile
+1
-1
test.js
test.js
+11
-3
wscript
wscript
+3
-0
No files found.
binding.cpp
View file @
34194da4
...
...
@@ -6,13 +6,12 @@ using namespace v8;
Handle
<
Value
>
Render
(
const
Arguments
&
args
)
{
HandleScope
scope
;
struct
sass_context
*
ctx
=
sass_new_context
();
String
::
AsciiValue
astr
(
args
[
0
]);
char
*
cs
=
*
astr
;
ctx
->
input_string
=
cs
;
ctx
->
options
.
include_paths
=
0
;
ctx
->
options
.
output_style
=
SASS_STYLE_NESTED
;
sass_compile
(
ctx
);
...
...
libsass/Makefile
View file @
34194da4
...
...
@@ -11,7 +11,7 @@ CPP_FILES = \
prelexer.cpp
libsass
:
libsass_objs
ar r
v
s libsass.a
\
ar rs libsass.a
\
sass_interface.o
\
context.o
\
functions.o
\
...
...
test.js
View file @
34194da4
var
sass
=
require
(
'./sass'
)
sass
.
render
(
'something'
)
\ No newline at end of file
var
sass
=
require
(
'./sass'
);
console
.
log
(
sass
.
render
(
'#navbar {
\
width: 80%;
\
height: 23px; }
\
#navbar ul {
\
list-style-type: none; }
\
#navbar li {
\
float: left;
\
a {
\
font-weight: bold; }}'
))
\ No newline at end of file
wscript
View file @
34194da4
...
...
@@ -12,9 +12,12 @@ def set_options(opt):
def configure(conf):
conf.check_tool("compiler_cxx")
conf.check_tool("node_addon")
conf.check(staticlib='sass', uselib_store='LIB_SASS', cpppath='./libsass/')
def build(bld):
obj = bld.new_task_gen("cxx", "shlib", "node_addon")
obj.uselib = "sass"
obj.target = "binding"
obj.source = "binding.cpp "
obj.use = ['LIB_SASS']
obj.add_obj_file("./libsass/libsass.a")
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment