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
60f66275
Commit
60f66275
authored
Nov 13, 2012
by
Dean Mao
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #39 from chrisleishman/pass_render_options
Pass options to render from middleware
parents
3ec82e67
b5b96bfa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
middleware.js
lib/middleware.js
+5
-1
No files found.
lib/middleware.js
View file @
60f66275
...
@@ -74,7 +74,8 @@ module.exports = function(options){
...
@@ -74,7 +74,8 @@ module.exports = function(options){
var
path
=
url
.
parse
(
req
.
url
).
pathname
;
var
path
=
url
.
parse
(
req
.
url
).
pathname
;
if
(
/
\.
css$/
.
test
(
path
))
{
if
(
/
\.
css$/
.
test
(
path
))
{
var
cssPath
=
join
(
dest
,
path
)
var
cssPath
=
join
(
dest
,
path
)
,
sassPath
=
join
(
src
,
path
.
replace
(
'.css'
,
'.scss'
));
,
sassPath
=
join
(
src
,
path
.
replace
(
'.css'
,
'.scss'
))
,
sassDir
=
dirname
(
sassPath
)
if
(
debug
)
{
if
(
debug
)
{
log
(
'source'
,
sassPath
);
log
(
'source'
,
sassPath
);
...
@@ -107,6 +108,9 @@ module.exports = function(options){
...
@@ -107,6 +108,9 @@ module.exports = function(options){
if
(
err
)
return
error
(
err
);
if
(
err
)
return
error
(
err
);
fs
.
writeFile
(
cssPath
,
css
,
'utf8'
,
next
);
fs
.
writeFile
(
cssPath
,
css
,
'utf8'
,
next
);
});
});
},
{
include_paths
:
[
sassDir
].
concat
(
options
.
include_paths
||
[]),
output_style
:
options
.
output_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