Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
styfle committed Feb 2, 2024
1 parent beea509 commit ff2015d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export default async function analyze(id: string, code: string, job: Job): Promi
const unixDirPath = process.platform === 'win32' ? dirPath.replace(/\\/g, '/') : dirPath;
const unixAssetDirPath = process.platform === 'win32' ? assetDirPath.replace(/\\/g, '/') : assetDirPath;
if (job.log) {
console.log(`Globbing ${unixDirPath}`);
console.log(`Globbing asset dir: ${unixDirPath}`);
}
const files = await glob(unixDirPath, { mark: true, ignore: unixAssetDirPath + '/**/node_modules/**/*', dot: true });
files
Expand Down Expand Up @@ -423,7 +423,7 @@ export default async function analyze(id: string, code: string, job: Job): Promi
const unixDirPath = process.platform === 'win32' ? dirPath.replace(/\\/g, '/') : dirPath;
const unixWildcardDirPath = process.platform === 'win32' ? wildcardDirPath.replace(/\\/g, '/') : wildcardDirPath;
if (job.log) {
console.log(`Globbing ${unixDirPath}`);
console.log(`Globbing wildcard dir: ${unixDirPath}`);
}
const files = await glob(unixDirPath, { mark: true, ignore: unixWildcardDirPath + '/**/node_modules/**/*' });
files
Expand Down
3 changes: 3 additions & 0 deletions src/utils/sharedlib-emit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export async function sharedLibEmit(path: string, job: Job) {
return;

const unixPkgPath = process.platform === 'win32' ? pkgPath.replace(/\\/g, '/') : pkgPath;
if (job.log) {
console.log(`Globbing sharedlib: ${unixPkgPath + sharedlibGlob}`);
}
const files = await glob(unixPkgPath + sharedlibGlob, { ignore: unixPkgPath + '/**/node_modules/**/*', dot: true });
await Promise.all(files.map(file => job.emitFile(file, 'sharedlib', path)));
};

0 comments on commit ff2015d

Please sign in to comment.