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
fd6a201d
Commit
fd6a201d
authored
Aug 26, 2014
by
Adeel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SourceMaps: Don't fix map generated by upstream.
parent
47085e57
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
10 deletions
+1
-10
sass.js
sass.js
+1
-10
No files found.
sass.js
View file @
fd6a201d
...
...
@@ -140,14 +140,6 @@ exports.renderSync = function(options) {
return
output
;
};
var
makeSourceMapUrlsRelative
=
function
(
sourceMap
,
dir
)
{
var
map
=
JSON
.
parse
(
sourceMap
);
map
.
sources
=
map
.
sources
.
map
(
function
(
source
)
{
return
path
.
relative
(
dir
,
source
);
});
return
JSON
.
stringify
(
map
);
};
/**
Same as `render()` but with an extra `outFile` property in `options` and writes
the CSS and sourceMap (if requested) to the filesystem.
...
...
@@ -166,7 +158,7 @@ exports.renderFile = function(options) {
options
=
assign
({},
options
);
success
=
options
.
success
;
if
(
options
.
sourceMap
===
true
)
{
options
.
sourceMap
=
path
.
basename
(
options
.
outFile
)
+
'.map'
;
options
.
sourceMap
=
options
.
outFile
+
'.map'
;
}
options
.
success
=
function
(
css
,
sourceMap
)
{
fs
.
writeFile
(
options
.
outFile
,
css
,
function
(
err
)
{
...
...
@@ -178,7 +170,6 @@ exports.renderFile = function(options) {
if
(
options
.
sourceMap
)
{
dir
=
path
.
dirname
(
options
.
outFile
);
sourceMapFile
=
path
.
resolve
(
dir
,
options
.
sourceMap
);
sourceMap
=
makeSourceMapUrlsRelative
(
sourceMap
,
path
.
dirname
(
sourceMapFile
));
fs
.
writeFile
(
sourceMapFile
,
sourceMap
,
function
(
err
)
{
if
(
err
)
{
return
options
.
error
(
err
);
...
...
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