import globLib, { IOptions } from "glob";
export function getAssetsDir() {
return `${__dirname}/../assets`;
}
export async function glob(pattern: string, options?: IOptions) {
return new Promise((resolve, reject) => {
if (options) {
globLib(pattern, options, (err, ret) => {
if (err) {
reject(err);
} else {
resolve(ret);
});
globLib(pattern, (err, ret) => {
}) as Promise<string[]>;