Skip to content

Commit

Permalink
perf: rm temp files after each run
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Sep 23, 2020
1 parent c52822c commit eeb7c73
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Insert script to `package.json`.
```json
{
"scripts": {
"build:libdef": "dts-generator --project ./ --out typings/index.d.ts --prefix @qiwi/libdefkit/target/es5 --name @qiwi/libdefkit --main @qiwi/libdefkit/target/es5/index --moduleResolution node && libdeffix --dts=./typings/index.d.ts --prefix=@qiwi/libdefkit/target/es5 && flowgen typings/index.d.ts --output-file flow-typed/index.flow.js"
"build:libdef": "libdefkit --tsconfig=tsconfig.es5.json --tsconfig=tsconfig.es6.json"
}
}
```
1 change: 1 addition & 0 deletions src/main/ts/libdefkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const pipeline: IExecPipe[] = [
clear,
dtsgen,
flowgen,
clear,
]

export const execute = (flags: ICliFlags) => pipeline.reduce((ctx, pipe) => pipe(ctx) || ctx, flags as IContext)
4 changes: 4 additions & 0 deletions src/test/ts/libdefkit.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ declare module '@qiwi/libdefkit/target/es6' {
}
declare module '@qiwi/libdefkit/target/es6/libdefkit' {
/** */
import { ICliFlags, IContext, IExecPipe } from '@qiwi/libdefkit/target/es6/interface';
export const normalize: IExecPipe;
export const clear: IExecPipe;
Expand All @@ -23,6 +24,7 @@ declare module '@qiwi/libdefkit/target/es6/libdefkit' {
}
declare module '@qiwi/libdefkit/target/es6/interface' {
/** */
import { StdioOptions } from 'child_process';
export type ICmdInvokeOptions = {
cmd: string;
Expand Down Expand Up @@ -59,6 +61,7 @@ declare module '@qiwi/libdefkit/target/es5' {
}
declare module '@qiwi/libdefkit/target/es5/libdefkit' {
/** */
import { ICliFlags, IContext, IExecPipe } from '@qiwi/libdefkit/target/es5/interface';
export const normalize: IExecPipe;
export const clear: IExecPipe;
Expand All @@ -68,6 +71,7 @@ declare module '@qiwi/libdefkit/target/es5/libdefkit' {
}
declare module '@qiwi/libdefkit/target/es5/interface' {
/** */
import { StdioOptions } from 'child_process';
export type ICmdInvokeOptions = {
cmd: string;
Expand Down

0 comments on commit eeb7c73

Please sign in to comment.