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
146c8e09
Commit
146c8e09
authored
May 07, 2015
by
Austin Pivarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace reserved word 'package' with 'pkg'
parent
16be724d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
extensions.js
lib/extensions.js
+7
-7
index.js
lib/index.js
+2
-2
install.js
scripts/install.js
+2
-2
No files found.
lib/extensions.js
View file @
146c8e09
...
...
@@ -4,7 +4,7 @@
var
flags
=
{},
fs
=
require
(
'fs'
),
p
ackage
=
require
(
'../package.json'
),
p
kg
=
require
(
'../package.json'
),
path
=
require
(
'path'
);
/**
...
...
@@ -63,8 +63,8 @@ function getBinaryName() {
binaryName
=
flags
[
'--sass-binary-name'
];
}
else
if
(
process
.
env
.
SASS_BINARY_NAME
)
{
binaryName
=
process
.
env
.
SASS_BINARY_NAME
;
}
else
if
(
p
ackage
.
nodeSassConfig
&&
package
.
nodeSassConfig
.
binaryName
)
{
binaryName
=
p
ackage
.
nodeSassConfig
.
binaryName
;
}
else
if
(
p
kg
.
nodeSassConfig
&&
pkg
.
nodeSassConfig
.
binaryName
)
{
binaryName
=
p
kg
.
nodeSassConfig
.
binaryName
;
}
else
{
binaryName
=
[
process
.
platform
,
'-'
,
process
.
arch
,
'-'
,
...
...
@@ -104,8 +104,8 @@ function getBinaryName() {
function
getBinaryUrl
()
{
var
site
=
flags
[
'--sass-binary-site'
]
||
process
.
env
.
SASS_BINARY_SITE
||
p
ackage
.
nodeSassConfig
.
binarySite
;
return
[
site
,
'v'
+
p
ackage
.
version
,
sass
.
binaryName
].
join
(
'/'
);
p
kg
.
nodeSassConfig
.
binarySite
;
return
[
site
,
'v'
+
p
kg
.
version
,
sass
.
binaryName
].
join
(
'/'
);
}
...
...
@@ -138,8 +138,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
(
p
ackage
.
nodeSassConfig
&&
package
.
nodeSassConfig
.
binaryPath
)
{
binaryPath
=
p
ackage
.
nodeSassConfig
.
binaryPath
;
}
else
if
(
p
kg
.
nodeSassConfig
&&
pkg
.
nodeSassConfig
.
binaryPath
)
{
binaryPath
=
p
kg
.
nodeSassConfig
.
binaryPath
;
}
else
{
binaryPath
=
path
.
join
(
__dirname
,
'..'
,
'vendor'
,
sass
.
binaryName
.
replace
(
/_/
,
'/'
));
}
...
...
lib/index.js
View file @
146c8e09
...
...
@@ -5,7 +5,7 @@
var
eol
=
require
(
'os'
).
EOL
,
path
=
require
(
'path'
),
util
=
require
(
'util'
),
p
ackage
=
require
(
'../package.json'
);
p
kg
=
require
(
'../package.json'
);
require
(
'./extensions'
);
...
...
@@ -23,7 +23,7 @@ var binding = require(process.sass.getBinaryPath(true));
function
getVersionInfo
(
binding
)
{
return
[
[
'node-sass'
,
p
ackage
.
version
,
'(Wrapper)'
,
'[JavaScript]'
].
join
(
'
\
t'
),
[
'node-sass'
,
p
kg
.
version
,
'(Wrapper)'
,
'[JavaScript]'
].
join
(
'
\
t'
),
[
'libsass '
,
binding
.
libsassVersion
(),
'(Sass Compiler)'
,
'[C/C++]'
].
join
(
'
\
t'
),
].
join
(
eol
);
}
...
...
scripts/install.js
View file @
146c8e09
...
...
@@ -7,7 +7,7 @@ var fs = require('fs'),
npmconf
=
require
(
'npmconf'
),
path
=
require
(
'path'
),
request
=
require
(
'request'
),
p
ackage
=
require
(
'../package.json'
);
p
kg
=
require
(
'../package.json'
);
require
(
'../lib/extensions'
);
...
...
@@ -33,7 +33,7 @@ function download(url, dest, cb) {
options
.
headers
=
{
'User-Agent'
:
[
'node/'
,
process
.
version
,
' '
,
'node-sass-installer/'
,
p
ackage
.
version
'node-sass-installer/'
,
p
kg
.
version
].
join
(
''
)
};
try
{
...
...
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