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
8efaac28
Commit
8efaac28
authored
Sep 15, 2015
by
Fabio Huser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduced .npmrc variables to configure sass binary parameters
parent
553dae35
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
extensions.js
lib/extensions.js
+11
-3
No files found.
lib/extensions.js
View file @
8efaac28
...
...
@@ -48,7 +48,8 @@ function getRuntimeInfo() {
/**
* Get binary name.
* If environment variable SASS_BINARY_NAME or
* If environment variable SASS_BINARY_NAME,
* .npmrc variable sass_binary_name or
* process argument --binary-name is provided,
* return it as is, otherwise make default binary
* name: {platform}-{arch}-{v8 version}.node
...
...
@@ -63,6 +64,8 @@ function getBinaryName() {
binaryName
=
flags
[
'--sass-binary-name'
];
}
else
if
(
process
.
env
.
SASS_BINARY_NAME
)
{
binaryName
=
process
.
env
.
SASS_BINARY_NAME
;
}
else
if
(
process
.
env
.
npm_config_sass_binary_name
)
{
binaryName
=
process
.
env
.
npm_config_sass_binary_name
;
}
else
if
(
pkg
.
nodeSassConfig
&&
pkg
.
nodeSassConfig
.
binaryName
)
{
binaryName
=
pkg
.
nodeSassConfig
.
binaryName
;
}
else
{
...
...
@@ -80,7 +83,8 @@ function getBinaryName() {
* site on GitHub.
*
* The default URL can be overriden using
* the environment variable SASS_BINARY_SITE
* the environment variable SASS_BINARY_SITE,
* .npmrc variable sass_binary_site or
* or a command line option --sass-binary-site:
*
* node scripts/install.js --sass-binary-site http://example.com/
...
...
@@ -104,6 +108,7 @@ function getBinaryName() {
function
getBinaryUrl
()
{
var
site
=
flags
[
'--sass-binary-site'
]
||
process
.
env
.
SASS_BINARY_SITE
||
process
.
env
.
npm_config_sass_binary_site
||
(
pkg
.
nodeSassConfig
&&
pkg
.
nodeSassConfig
.
binarySite
)
||
'https://github.com/sass/node-sass/releases/download'
;
...
...
@@ -121,7 +126,8 @@ sass.runtime = getRuntimeInfo();
/**
* Get binary path.
* If environment variable SASS_BINARY_PATH or
* If environment variable SASS_BINARY_PATH,
* .npmrc variable sass_binary_path or
* process argument --sass-binary-path is provided,
* select it by appending binary name, otherwise
* make default binary path using binary name.
...
...
@@ -140,6 +146,8 @@ sass.getBinaryPath = function(throwIfNotExists) {
binaryPath
=
flags
[
'--sass-binary-path'
];
}
else
if
(
process
.
env
.
SASS_BINARY_PATH
)
{
binaryPath
=
process
.
env
.
SASS_BINARY_PATH
;
}
else
if
(
process
.
env
.
npm_config_sass_binary_path
)
{
binaryPath
=
process
.
env
.
npm_config_sass_binary_path
;
}
else
if
(
pkg
.
nodeSassConfig
&&
pkg
.
nodeSassConfig
.
binaryPath
)
{
binaryPath
=
pkg
.
nodeSassConfig
.
binaryPath
;
}
else
{
...
...
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