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
ec18ef5e
Commit
ec18ef5e
authored
Jan 02, 2016
by
Michael Mifsud
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1322 from nibblebot/master
Allow symlinked output directories
parents
23d5ba54
b1f697d8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletions
+19
-1
node-sass
bin/node-sass
+1
-1
cli.js
test/cli.js
+18
-0
No files found.
bin/node-sass
View file @
ec18ef5e
...
...
@@ -109,7 +109,7 @@ function isDirectory(filePath) {
var
isDir
=
false
;
try
{
var
absolutePath
=
path
.
resolve
(
filePath
);
isDir
=
fs
.
l
statSync
(
absolutePath
).
isDirectory
();
isDir
=
fs
.
statSync
(
absolutePath
).
isDirectory
();
}
catch
(
e
)
{
isDir
=
e
.
code
===
'ENOENT'
;
}
...
...
test/cli.js
View file @
ec18ef5e
...
...
@@ -588,6 +588,24 @@ describe('cli', function() {
});
});
it
(
'should not error if output directory is a symlink'
,
function
(
done
)
{
var
outputDir
=
fixture
(
'input-directory/css'
);
var
src
=
fixture
(
'input-directory/sass'
);
var
symlink
=
fixture
(
'symlinked-css'
);
fs
.
mkdirSync
(
outputDir
);
fs
.
symlinkSync
(
outputDir
,
symlink
);
var
bin
=
spawn
(
cli
,
[
src
,
'--output'
,
symlink
]);
bin
.
once
(
'close'
,
function
()
{
var
files
=
fs
.
readdirSync
(
outputDir
).
sort
();
assert
.
deepEqual
(
files
,
[
'one.css'
,
'two.css'
,
'nested'
].
sort
());
var
nestedFiles
=
fs
.
readdirSync
(
path
.
join
(
outputDir
,
'nested'
));
assert
.
deepEqual
(
nestedFiles
,
[
'three.css'
]);
rimraf
.
sync
(
outputDir
);
fs
.
unlinkSync
(
symlink
);
done
();
});
});
});
describe
(
'node-sass in.scss --output path/to/file/out.css'
,
function
()
{
...
...
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