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
d9058348
Commit
d9058348
authored
Apr 17, 2014
by
Johannes Ewald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Normalized option handling
parent
0d49a12a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
sass.js
sass.js
+6
-8
No files found.
sass.js
View file @
d9058348
...
@@ -68,14 +68,12 @@ var deprecatedRender = function(css, callback, options) {
...
@@ -68,14 +68,12 @@ var deprecatedRender = function(css, callback, options) {
options
.
success
=
function
(
css
)
{
options
.
success
=
function
(
css
)
{
callback
(
null
,
css
);
callback
(
null
,
css
);
};
};
options
.
data
=
css
;
return
binding
.
render
(
css
,
options
.
imagePath
,
options
.
success
,
options
.
error
,
options
.
paths
,
options
.
style
,
options
.
comments
);
return
binding
.
render
(
options
);
};
};
var
deprecatedRenderSync
=
function
(
css
,
options
)
{
var
deprecatedRenderSync
=
function
(
css
,
options
)
{
options
=
prepareOptions
(
options
);
options
=
prepareOptions
(
options
);
options
.
data
=
css
;
return
binding
.
renderSync
(
css
,
options
.
imagePath
,
options
.
paths
,
options
.
style
,
options
.
comments
);
return
binding
.
renderSync
(
options
);
};
};
exports
.
render
=
function
(
options
)
{
exports
.
render
=
function
(
options
)
{
...
@@ -86,11 +84,11 @@ exports.render = function(options) {
...
@@ -86,11 +84,11 @@ exports.render = function(options) {
options
=
prepareOptions
(
options
);
options
=
prepareOptions
(
options
);
if
(
options
.
file
)
{
if
(
options
.
file
)
{
return
binding
.
renderFile
(
options
);
return
binding
.
renderFile
(
options
.
file
,
options
.
imagePath
,
options
.
success
,
options
.
error
,
options
.
paths
,
options
.
style
,
options
.
comments
,
options
.
sourceMap
);
}
}
//Assume data is present if file is not. binding/libsass will tell the user otherwise!
//Assume data is present if file is not. binding/libsass will tell the user otherwise!
return
binding
.
render
(
options
);
return
binding
.
render
(
options
.
data
,
options
.
imagePath
,
options
.
success
,
options
.
error
,
options
.
paths
,
options
.
style
);
};
};
exports
.
renderSync
=
function
(
options
)
{
exports
.
renderSync
=
function
(
options
)
{
...
@@ -101,11 +99,11 @@ exports.renderSync = function(options) {
...
@@ -101,11 +99,11 @@ exports.renderSync = function(options) {
options
=
prepareOptions
(
options
);
options
=
prepareOptions
(
options
);
if
(
options
.
file
)
{
if
(
options
.
file
)
{
return
binding
.
renderFileSync
(
options
);
return
binding
.
renderFileSync
(
options
.
file
,
options
.
imagePath
,
options
.
paths
,
options
.
style
,
options
.
comments
);
}
}
//Assume data is present if file is not. binding/libsass will tell the user otherwise!
//Assume data is present if file is not. binding/libsass will tell the user otherwise!
return
binding
.
renderSync
(
options
);
return
binding
.
renderSync
(
options
.
data
,
options
.
imagePath
,
options
.
paths
,
options
.
style
);
};
};
/**
/**
...
...
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