Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sqlite3
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-sqlite3
Commits
a753a71a
Commit
a753a71a
authored
Oct 31, 2013
by
Dane Springmeyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove uneeded progress dependency
parent
60b06c6b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
14 deletions
+0
-14
tools.js
build-util/tools.js
+0
-13
package.json
package.json
+0
-1
No files found.
build-util/tools.js
View file @
a753a71a
var
ProgressBar
=
require
(
'progress'
);
var
http
=
require
(
'http'
);
var
http
=
require
(
'http'
);
var
url
=
require
(
'url'
);
var
url
=
require
(
'url'
);
...
@@ -12,16 +11,6 @@ function download(from,options,callback) {
...
@@ -12,16 +11,6 @@ function download(from,options,callback) {
if
(
res
.
statusCode
!==
200
)
{
if
(
res
.
statusCode
!==
200
)
{
return
callback
(
new
Error
(
'Server returned '
+
res
.
statusCode
));
return
callback
(
new
Error
(
'Server returned '
+
res
.
statusCode
));
}
}
if
(
options
.
progress
)
{
var
len
=
parseInt
(
res
.
headers
[
'content-length'
],
10
);
console
.
log
();
var
bar
=
new
ProgressBar
(
'Downloading [:bar] :percent :etas'
,
{
complete
:
'='
,
incomplete
:
' '
,
width
:
40
,
total
:
len
});
}
function
returnBuffer
()
{
function
returnBuffer
()
{
// todo - use http://nodejs.org/api/buffer.html#buffer_class_method_buffer_concat_list_totallength
// todo - use http://nodejs.org/api/buffer.html#buffer_class_method_buffer_concat_list_totallength
for
(
var
length
=
0
,
i
=
0
;
i
<
out
.
length
;
++
i
)
{
for
(
var
length
=
0
,
i
=
0
;
i
<
out
.
length
;
++
i
)
{
...
@@ -36,11 +25,9 @@ function download(from,options,callback) {
...
@@ -36,11 +25,9 @@ function download(from,options,callback) {
}
}
var
out
=
[];
var
out
=
[];
res
.
on
(
'data'
,
function
(
chunk
)
{
res
.
on
(
'data'
,
function
(
chunk
)
{
if
(
options
.
progress
)
bar
.
tick
(
chunk
.
length
);
out
.
push
(
chunk
);
out
.
push
(
chunk
);
});
});
res
.
on
(
'end'
,
function
(){
res
.
on
(
'end'
,
function
(){
if
(
options
.
progress
)
console
.
log
(
'
\
n'
);
returnBuffer
();
returnBuffer
();
});
});
res
.
on
(
'close'
,
function
(){
res
.
on
(
'close'
,
function
(){
...
...
package.json
View file @
a753a71a
...
@@ -30,7 +30,6 @@
...
@@ -30,7 +30,6 @@
"url"
:
"git://github.com/mapbox/node-sqlite3.git"
"url"
:
"git://github.com/mapbox/node-sqlite3.git"
},
},
"dependencies"
:
{
"dependencies"
:
{
"
progress
"
:
"~1.0.1"
,
"
mkdirp
"
:
"~0.3.5"
,
"
mkdirp
"
:
"~0.3.5"
,
"
tar.gz
"
:
"~0.1.1"
"
tar.gz
"
:
"~0.1.1"
},
},
...
...
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