Skip to content

Commit

Permalink
fix: refact npm run build with np, to get a better publish
Browse files Browse the repository at this point in the history
  • Loading branch information
i5ting committed Oct 10, 2022
1 parent 1da6450 commit 966700a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"scripts": {
"start": "ts-node ./src/bin.ts",
"build": "rm -rf ./dist && tsc",
"build": "rm -rf ./dist && tsc && np",
"test": "uvu -r ts-node/register test -i fixtures",
"dev": "ts-node test.ts",
"cli": "ts-node src/bin.ts tests/test.ts",
Expand Down Expand Up @@ -53,6 +53,7 @@
"@types/yargs": "^17.0.13",
"concurrently": "^5.3.0",
"git-cz": "^4.9.0",
"np": "^7.6.2",
"ts-node": "^10.9.1"
},
"files": [
Expand Down
5 changes: 3 additions & 2 deletions types/Context.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import IStrategy from './IStrategy';
import IStrategy from "./IStrategy";
export default class Context {
private strategy;
constructor(strategy: IStrategy);
setStrategy(strategy: IStrategy): void;
runTest(tsFile: string, jsFile: string): void;
runTests(dir: String): void;
runTsTestFiles(files: string[]): any;
private _runTsTestFile;
}
3 changes: 3 additions & 0 deletions types/Utils.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
export declare function Debug(name?: string): any;
export declare function DebugWith(key: String): any;
export declare function get_closest_package_json(): any;
export declare function getFiles(rest: any): string[];
export declare function getCompileFiles(testFiles: string[]): string[];
export declare function unique(arr: string[]): string[];
5 changes: 2 additions & 3 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ export * from "./parse";
export * from "./loadObject/scan";
export * from "./loadObject/require";
export * from "./loadObject/flatten";
export declare function executeWithDefaultStrategy(dirs: string[]): void;
export declare function executeFileWithDefaultStrategy(testFiles: string[]): void;
export declare function execute(rest: any): void;
export declare function runCli(rest: any): void;
export declare function run(rest: any): void;
8 changes: 7 additions & 1 deletion types/loadObject/scan.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
export declare function clearCache(): void;
export declare function getAllTsFiles(dirs: string[]): any[];
export declare function getTsFiles(dir: string): {};
export declare function load(file: string): {
export declare function loadFromDecorator(file: string): {
clz_name: any;
newClz: any;
};
export declare function loadFromCache(file: string): Promise<{
clz_name: any;
newClz: any;
}>;
5 changes: 2 additions & 3 deletions types/watch.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import Context from './Context';
export declare function WatchDir(dirs: string[], context: Context): void;
export declare function WatchFile(testFile: string, context: Context): void;
import Context from "./Context";
export declare function WatchFiles(testFiles: string[], context: Context): void;

0 comments on commit 966700a

Please sign in to comment.