ci: fix npm ci (#27)
This commit is contained in:
parent
58ca06d1e0
commit
dc1af0802f
3 changed files with 140 additions and 150 deletions
|
|
@ -4,7 +4,7 @@ import * as path from "path";
|
|||
|
||||
import * as pako from "pako";
|
||||
import * as mkdirp from "mkdirp";
|
||||
import * as glob from "glob-promise";
|
||||
import * as glob from "glob";
|
||||
import "source-map-support/register";
|
||||
import * as prettyMs from "pretty-ms";
|
||||
import * as cliProgress from "cli-progress";
|
||||
|
|
@ -15,6 +15,18 @@ import { DbcManager, IItemAppearanceDbc, IItemModifiedAppearanceDbc, IMountDbc,
|
|||
|
||||
const baseUrl = "https://wow.zamimg.com/modelviewer/live";
|
||||
|
||||
const globAsync = (pattern: string, options?: glob.IOptions) => {
|
||||
return new Promise<string[]>((res, rej) => {
|
||||
glob(pattern, options, (err, matches) => {
|
||||
if (err) {
|
||||
rej(err);
|
||||
} else {
|
||||
res(matches);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
class Stopwatch {
|
||||
private startTime: number;
|
||||
|
||||
|
|
@ -367,7 +379,7 @@ async function downloadBones(): Promise<void> {
|
|||
}
|
||||
|
||||
async function parseModels(): Promise<void> {
|
||||
const files = await glob("data/mo3/*.mo3");
|
||||
const files = await globAsync("data/mo3/*.mo3");
|
||||
const progress = new Progress("Reading model files for texture references...", files.length);
|
||||
|
||||
await promisepool.PromisePool.for(files)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue