Skip to content

Commit

Permalink
Copy files after comparison is complete (#157)
Browse files Browse the repository at this point in the history
* fix: copy files after comparison is complete

* fix: add skipLibCheck

- for node-lru-cache type error
  - isaacs/node-lru-cache#354
  • Loading branch information
totto2727 authored Sep 25, 2024
1 parent d77fd17 commit aa5746b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
21 changes: 11 additions & 10 deletions src/compare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,6 @@ export const compare = async (config: Config): Promise<CompareOutput> =>
enableAntialias: config.enableAntialias,
});

if (config.reportFilePath) {
log.info(`reportFilePath ${config.reportFilePath} detected`);
try {
await cpy(workspace() + '/**/*', config.reportFilePath);
log.info(`Succeeded to copy reg data to ${config.reportFilePath}.`);
} catch (e) {
log.error(`Failed to copy reg data to ${config.reportFilePath} reason: ${e}`);
}
}

emitter.on('complete', result => {
log.debug('compare result', result);
log.info('Comparison Complete');
Expand All @@ -52,4 +42,15 @@ export const compare = async (config: Config): Promise<CompareOutput> =>
log.info(chalk.green(' Passed items: ' + result.passedItems.length));
resolve(result);
});
}).then(async (result) => {
if (config.reportFilePath) {
log.info(`reportFilePath ${config.reportFilePath} detected`);
try {
await cpy(workspace() + '/**/*', config.reportFilePath);
log.info(`Succeeded to copy reg data to ${config.reportFilePath}.`);
} catch (e) {
log.error(`Failed to copy reg data to ${config.reportFilePath} reason: ${e}`);
}
}
return result
});
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
// "typeRoots": [], /* List of folders to include type definitions from. */
"types": ["@types/node"], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */

Expand All @@ -58,6 +58,7 @@
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
"skipLibCheck": true
},
"exclude": ["node_modules", "**/*.test.ts"]
}

0 comments on commit aa5746b

Please sign in to comment.