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
643190a5
Commit
643190a5
authored
Apr 11, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proof-of-concept pure C driver. It actually works.
parent
19a492ad
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
sassc.c
sassc.c
+49
-0
No files found.
sassc.c
0 → 100644
View file @
643190a5
//
// This is when you want to compile a whole folder of stuff
//
// var opts = sass_new_context();
// opts->sassPath = "/Users/hcatlin/dev/asset/stylesheet";
// opts->cssPath = "/Users/hcatlin/dev/asset/stylesheets/.css";
// opts->includePaths = "/Users/hcatlin/dev/asset/stylesheets:/Users/hcatlin/sasslib";
// opts->outputStyle => SASS_STYLE_COMPRESSED;
// sass_compile(opts, &callbackfunction);
//
//
// This is when you want to compile a string
//
// opts = sass_new_context();
// opts->inputString = "a { width: 50px; }";
// opts->includePaths = "/Users/hcatlin/dev/asset/stylesheets:/Users/hcatlin/sasslib";
// opts->outputStyle => SASS_STYLE_EXPANDED;
// var cssResult = sass_compile(opts, &callbackfunction);
#include <stdio.h>
#include "sass_interface.h"
int
main
(
int
argc
,
char
**
argv
)
{
// blah, nothing yet
printf
(
"Hey, does this work?
\n
"
);
if
(
argc
<
2
)
{
printf
(
"Hey, I need an input file!
\n
"
);
return
0
;
}
struct
sass_context
*
ctx
=
sass_new_context
();
ctx
->
sass_path
=
""
;
ctx
->
css_path
=
""
;
ctx
->
include_paths
=
""
;
ctx
->
output_style
=
0
;
ctx
->
input_file
=
argv
[
1
];
ctx
->
input_string
=
NULL
;
printf
(
"Still working?
\n
"
);
char
*
output
=
sass_compile
(
ctx
);
printf
(
"%s"
,
output
);
return
0
;
}
\ No newline at end of file
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