fixed dtsgen not creating target directory
This commit is contained in:
parent
b584279dc7
commit
923de09df4
3 changed files with 11 additions and 4 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -14,4 +14,6 @@ auth/js/auth.js.map
|
||||||
.sass-cache/
|
.sass-cache/
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
.package-lock.json
|
.package-lock.json
|
||||||
|
|
||||||
|
TeaSpeakUI.tar.gz
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import {readFileSync, writeFileSync} from "fs";
|
import {readFileSync, writeFileSync, mkdir} from "fs";
|
||||||
import {isArray, isString} from "util";
|
import {isArray, isString} from "util";
|
||||||
import * as ts from "typescript";
|
import * as ts from "typescript";
|
||||||
import * as decl from "./declarator";
|
import * as decl from "./declarator";
|
||||||
import * as glob from "glob";
|
import * as glob from "glob";
|
||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
|
import * as mkdirp from "mkdirp";
|
||||||
|
|
||||||
let source_files: string[] = [];
|
let source_files: string[] = [];
|
||||||
let exclude_files: string[] = [];
|
let exclude_files: string[] = [];
|
||||||
|
@ -87,4 +88,8 @@ source_files.forEach(file => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
writeFileSync(base_path + "/" + target_file, result);
|
mkdirp(path.normalize(path.dirname(base_path + "/" + target_file)), error => {
|
||||||
|
if(error)
|
||||||
|
throw error;
|
||||||
|
writeFileSync(base_path + "/" + target_file, result);
|
||||||
|
});
|
|
@ -6,4 +6,4 @@
|
||||||
"../js/workers/**/*.ts"
|
"../js/workers/**/*.ts"
|
||||||
],
|
],
|
||||||
"target_file": "../declarations/exports.d.ts"
|
"target_file": "../declarations/exports.d.ts"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue