mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2024-11-27 02:24:04 -05:00
Remove dependency on event-stream
Node has built in functions for reading lines from a file, so there's no need to depend on `event-stream` just for it.
This commit is contained in:
parent
54cbb22339
commit
912ab5edff
29
LICENSE.md
29
LICENSE.md
@ -246,35 +246,6 @@ http://cesiumjs.org/
|
|||||||
|
|
||||||
See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
|
See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
|
||||||
|
|
||||||
### event-stream
|
|
||||||
|
|
||||||
https://www.npmjs.com/package/event-stream
|
|
||||||
|
|
||||||
> The MIT License (MIT)
|
|
||||||
>
|
|
||||||
> Copyright (c) 2011 Dominic Tarr
|
|
||||||
>
|
|
||||||
> Permission is hereby granted, free of charge,
|
|
||||||
> to any person obtaining a copy of this software and
|
|
||||||
> associated documentation files (the "Software"), to
|
|
||||||
> deal in the Software without restriction, including
|
|
||||||
> without limitation the rights to use, copy, modify,
|
|
||||||
> merge, publish, distribute, sublicense, and/or sell
|
|
||||||
> copies of the Software, and to permit persons to whom
|
|
||||||
> the Software is furnished to do so,
|
|
||||||
> subject to the following conditions:
|
|
||||||
>
|
|
||||||
> The above copyright notice and this permission notice
|
|
||||||
> shall be included in all copies or substantial portions of the Software.
|
|
||||||
>
|
|
||||||
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||||
> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
|
||||||
> ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
||||||
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
### fs-extra
|
### fs-extra
|
||||||
|
|
||||||
https://www.npmjs.com/package/fs-extra
|
https://www.npmjs.com/package/fs-extra
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
var eventStream = require('event-stream');
|
|
||||||
var fsExtra = require('fs-extra');
|
var fsExtra = require('fs-extra');
|
||||||
var Promise = require('bluebird');
|
var Promise = require('bluebird');
|
||||||
|
var readline = require('readline');
|
||||||
|
|
||||||
module.exports = readLines;
|
module.exports = readLines;
|
||||||
|
|
||||||
@ -15,13 +15,14 @@ module.exports = readLines;
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
function readLines(path, callback) {
|
function readLines(path, callback) {
|
||||||
return new Promise(function(resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
fsExtra.createReadStream(path)
|
var stream = fsExtra.createReadStream(path);
|
||||||
.on('error', reject)
|
stream.on('error', reject);
|
||||||
.on('end', resolve)
|
stream.on('end', resolve);
|
||||||
.pipe(eventStream.split())
|
|
||||||
.pipe(eventStream.mapSync(function (line) {
|
var lineReader = readline.createInterface({
|
||||||
callback(line);
|
input: stream
|
||||||
}));
|
});
|
||||||
|
lineReader.on('line', callback);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bluebird": "^3.4.7",
|
"bluebird": "^3.4.7",
|
||||||
"cesium": "^1.31.0",
|
"cesium": "^1.31.0",
|
||||||
"event-stream": "^3.3.4",
|
|
||||||
"fs-extra": "^3.0.1",
|
"fs-extra": "^3.0.1",
|
||||||
"gltf-pipeline": "^0.1.0-alpha11",
|
"gltf-pipeline": "^0.1.0-alpha11",
|
||||||
"mime": "^1.3.4",
|
"mime": "^1.3.4",
|
||||||
|
Loading…
Reference in New Issue
Block a user