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
63331e07
Commit
63331e07
authored
Feb 12, 2015
by
Adeel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code: Minor fixes.
parent
5bff1c73
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
extensions.js
lib/extensions.js
+3
-3
install.js
scripts/install.js
+12
-12
No files found.
lib/extensions.js
View file @
63331e07
...
...
@@ -9,10 +9,10 @@ var semver = require('semver'),
function
getRuntimeName
()
{
var
runtime
=
process
.
execPath
.
split
(
/
[\\/]
+/
).
pop
()
.
split
(
'.'
).
shift
();
.
split
(
/
[\\/]
+/
).
pop
()
.
split
(
'.'
).
shift
();
return
runtime
===
'node
'
||
runtime
===
'node
js'
?
'node'
:
runtime
;
return
runtime
===
'nodejs'
?
'node'
:
runtime
;
}
/**
...
...
scripts/install.js
View file @
63331e07
...
...
@@ -22,11 +22,13 @@ function download(url, dest, cb) {
var
returnError
=
function
(
err
)
{
cb
(
typeof
err
.
message
===
'string'
?
err
.
message
:
err
);
};
request
.
get
(
url
,
options
).
on
(
'response'
,
function
(
response
)
{
if
(
response
.
statusCode
<
200
||
response
.
statusCode
>=
300
)
{
returnError
(
'Can not download file from '
+
url
);
return
;
}
response
.
pipe
(
fs
.
createWriteStream
(
dest
));
}).
on
(
'error'
,
returnError
);
});
...
...
@@ -45,21 +47,19 @@ function applyProxy(options, cb) {
var
proxyUrl
;
if
(
!
er
)
{
[
'https-proxy'
,
'proxy'
,
'http-proxy'
].
some
(
function
(
setting
)
{
var
npmProxyUrl
=
conf
.
get
(
setting
);
if
(
npmProxyUrl
)
{
proxyUrl
=
npmProxyUrl
;
return
true
;
}
});
proxyUrl
=
conf
.
get
(
'https-proxy'
)
||
conf
.
get
(
'proxy'
)
||
conf
.
get
(
'http-proxy'
);
}
if
(
!
proxyUrl
)
{
var
env
=
process
.
env
;
proxyUrl
=
env
.
HTTPS_PROXY
||
env
.
https_proxy
||
env
.
HTTP_PROXY
||
env
.
http_proxy
;
}
var
env
=
process
.
env
;
options
.
proxy
=
proxyUrl
||
env
.
HTTPS_PROXY
||
env
.
https_proxy
||
env
.
HTTP_PROXY
||
env
.
http_proxy
;
options
.
proxy
=
proxyUrl
;
cb
(
options
);
});
}
...
...
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