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
dc19cd52
Commit
dc19cd52
authored
Feb 15, 2016
by
Nowell Strite
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Custom importers cause out of order chained imports.
parent
03aa20e7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
0 deletions
+28
-0
api.js
test/api.js
+23
-0
chained-imports-with-custom-importer.scss
...s/include-files/chained-imports-with-custom-importer.scss
+1
-0
file-not-processed-by-loader.scss
.../fixtures/include-files/file-not-processed-by-loader.scss
+1
-0
file-processed-by-loader.scss
test/fixtures/include-files/file-processed-by-loader.scss
+3
-0
No files found.
test/api.js
View file @
dc19cd52
...
...
@@ -186,6 +186,29 @@ describe('api', function() {
describe
(
'.render(importer)'
,
function
()
{
var
src
=
read
(
fixture
(
'include-files/index.scss'
),
'utf8'
);
it
(
'should respect the order of chained imports when using custom importers and one file is custom imported and the other is not.'
,
function
(
done
)
{
sass
.
render
({
file
:
fixture
(
'include-files/chained-imports-with-custom-importer.scss'
),
importer
:
function
(
url
,
prev
,
done
)
{
if
(
url
!==
'file-processed-by-loader'
)
{
return
sass
.
NULL
;
}
done
({
file
:
fixture
(
'include-files/file-processed-by-loader.scss'
)
});
}
},
function
(
err
,
data
)
{
assert
.
equal
(
err
,
null
);
assert
.
equal
(
data
.
css
.
toString
().
trim
(),
'body {
\
n color: "red"; }'
);
done
();
});
});
it
(
'should still call the next importer with the resolved prev path when the previous importer returned both a file and contents property - issue #1219'
,
function
(
done
)
{
sass
.
render
({
data
:
'@import "a";'
,
...
...
test/fixtures/include-files/chained-imports-with-custom-importer.scss
0 → 100644
View file @
dc19cd52
@import
"file-not-processed-by-loader"
,
"file-processed-by-loader"
;
test/fixtures/include-files/file-not-processed-by-loader.scss
0 → 100644
View file @
dc19cd52
$variable-defined-by-file-not-processed-by-loader
:
'red'
;
test/fixtures/include-files/file-processed-by-loader.scss
0 → 100644
View file @
dc19cd52
body
{
color
:
$variable-defined-by-file-not-processed-by-loader
;
}
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