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
ff3fe626
Commit
ff3fe626
authored
Apr 21, 2015
by
xzyfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Respect the LIBSASS_EXT build flag when falling back to git
parent
ea3430e3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
build.js
scripts/build.js
+7
-3
No files found.
scripts/build.js
View file @
ff3fe626
...
@@ -98,10 +98,12 @@ function initSubmodules(cb) {
...
@@ -98,10 +98,12 @@ function initSubmodules(cb) {
* @api private
* @api private
*/
*/
function
installGitDependencies
(
cb
)
{
function
installGitDependencies
(
options
,
cb
)
{
var
libsassPath
=
'./src/libsass'
;
var
libsassPath
=
'./src/libsass'
;
if
(
fs
.
access
)
{
// node 0.12+, iojs 1.0.0+
if
(
process
.
env
.
LIBSASS_EXT
||
options
.
libsassExt
)
{
cb
();
}
else
if
(
fs
.
access
)
{
// node 0.12+, iojs 1.0.0+
fs
.
access
(
libsassPath
,
fs
.
R_OK
,
function
(
err
)
{
fs
.
access
(
libsassPath
,
fs
.
R_OK
,
function
(
err
)
{
err
&&
err
.
code
===
'ENOENT'
?
initSubmodules
(
cb
)
:
cb
();
err
&&
err
.
code
===
'ENOENT'
?
initSubmodules
(
cb
)
:
cb
();
});
});
...
@@ -120,7 +122,7 @@ function installGitDependencies(cb) {
...
@@ -120,7 +122,7 @@ function installGitDependencies(cb) {
*/
*/
function
build
(
options
)
{
function
build
(
options
)
{
installGitDependencies
(
function
(
err
)
{
installGitDependencies
(
options
,
function
(
err
)
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
err
.
message
);
console
.
error
(
err
.
message
);
process
.
exit
(
1
);
process
.
exit
(
1
);
...
@@ -171,6 +173,8 @@ function parseArgs(args) {
...
@@ -171,6 +173,8 @@ function parseArgs(args) {
options
.
arch
=
arg
.
substring
(
14
);
options
.
arch
=
arg
.
substring
(
14
);
}
else
if
(
arg
===
'-d'
||
arg
===
'--debug'
)
{
}
else
if
(
arg
===
'-d'
||
arg
===
'--debug'
)
{
options
.
debug
=
true
;
options
.
debug
=
true
;
}
else
if
(
arg
.
substring
(
0
,
13
)
===
'--libsass_ext'
&&
arg
.
substring
(
14
)
!==
'no'
)
{
options
.
libsassExt
=
true
;
}
}
return
true
;
return
true
;
...
...
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