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
c5a2d38d
Commit
c5a2d38d
authored
Nov 15, 2016
by
Michael Mifsud
Committed by
GitHub
Nov 15, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1803 from sass/feat/log-to-stdout
Send npmlog to stdout
parents
e0aef954
e7ad0cb3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletions
+13
-1
build.js
scripts/build.js
+9
-1
install.js
scripts/install.js
+4
-0
No files found.
scripts/build.js
View file @
c5a2d38d
...
@@ -10,6 +10,8 @@ var pkg = require('../package.json'),
...
@@ -10,6 +10,8 @@ var pkg = require('../package.json'),
log
=
require
(
'npmlog'
),
log
=
require
(
'npmlog'
),
sass
=
require
(
'../lib/extensions'
);
sass
=
require
(
'../lib/extensions'
);
log
.
stream
=
process
.
stdout
;
/**
/**
* After build
* After build
*
*
...
@@ -27,6 +29,8 @@ function afterBuild(options) {
...
@@ -27,6 +29,8 @@ function afterBuild(options) {
'binding.node'
);
'binding.node'
);
mkdir
(
path
.
dirname
(
install
),
function
(
err
)
{
mkdir
(
path
.
dirname
(
install
),
function
(
err
)
{
log
.
stream
=
process
.
stderr
;
if
(
err
&&
err
.
code
!==
'EEXIST'
)
{
if
(
err
&&
err
.
code
!==
'EEXIST'
)
{
log
.
error
(
'node-sass build'
,
err
.
message
);
log
.
error
(
'node-sass build'
,
err
.
message
);
return
;
return
;
...
@@ -44,6 +48,7 @@ function afterBuild(options) {
...
@@ -44,6 +48,7 @@ function afterBuild(options) {
return
;
return
;
}
}
log
.
stream
=
process
.
stdout
;
log
.
info
(
'node-sass build'
,
'Installed to %s'
,
install
);
log
.
info
(
'node-sass build'
,
'Installed to %s'
,
install
);
});
});
});
});
...
@@ -128,6 +133,7 @@ function installGitDependencies(options, cb) {
...
@@ -128,6 +133,7 @@ function installGitDependencies(options, cb) {
function
build
(
options
)
{
function
build
(
options
)
{
installGitDependencies
(
options
,
function
(
err
)
{
installGitDependencies
(
options
,
function
(
err
)
{
if
(
err
)
{
if
(
err
)
{
log
.
stream
=
process
.
stderr
;
log
.
error
(
'node-sass build'
,
err
.
message
);
log
.
error
(
'node-sass build'
,
err
.
message
);
process
.
exit
(
1
);
process
.
exit
(
1
);
}
}
...
@@ -149,7 +155,9 @@ function build(options) {
...
@@ -149,7 +155,9 @@ function build(options) {
return
;
return
;
}
}
if
(
errorCode
===
127
)
{
log
.
stream
=
process
.
stderr
;
if
(
errorCode
===
127
)
{
log
.
error
(
'node-sass build'
,
'node-gyp not found!'
);
log
.
error
(
'node-sass build'
,
'node-gyp not found!'
);
}
else
{
}
else
{
log
.
error
(
'node-sass build'
,
'Build failed with error code: %d'
,
errorCode
);
log
.
error
(
'node-sass build'
,
'Build failed with error code: %d'
,
errorCode
);
...
...
scripts/install.js
View file @
c5a2d38d
...
@@ -11,6 +11,8 @@ var fs = require('fs'),
...
@@ -11,6 +11,8 @@ var fs = require('fs'),
log
=
require
(
'npmlog'
),
log
=
require
(
'npmlog'
),
downloadOptions
=
require
(
'./util/downloadoptions'
);
downloadOptions
=
require
(
'./util/downloadoptions'
);
log
.
stream
=
process
.
stdout
;
/**
/**
* Download file, if succeeds save, if not delete
* Download file, if succeeds save, if not delete
*
*
...
@@ -110,6 +112,7 @@ function checkAndDownloadBinary() {
...
@@ -110,6 +112,7 @@ function checkAndDownloadBinary() {
try
{
try
{
mkdir
.
sync
(
path
.
dirname
(
binaryPath
));
mkdir
.
sync
(
path
.
dirname
(
binaryPath
));
}
catch
(
err
)
{
}
catch
(
err
)
{
log
.
stream
=
process
.
stderr
;
log
.
error
(
'node-sass install'
,
'Unable to save binary to %s: %s'
,
path
.
dirname
(
binaryPath
),
err
);
log
.
error
(
'node-sass install'
,
'Unable to save binary to %s: %s'
,
path
.
dirname
(
binaryPath
),
err
);
return
;
return
;
}
}
...
@@ -122,6 +125,7 @@ function checkAndDownloadBinary() {
...
@@ -122,6 +125,7 @@ function checkAndDownloadBinary() {
download
(
sass
.
getBinaryUrl
(),
binaryPath
,
function
(
err
)
{
download
(
sass
.
getBinaryUrl
(),
binaryPath
,
function
(
err
)
{
if
(
err
)
{
if
(
err
)
{
log
.
stream
=
process
.
stderr
;
log
.
error
(
'node-sass install'
,
err
);
log
.
error
(
'node-sass install'
,
err
);
return
;
return
;
}
}
...
...
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