fixed dtsgen not creating target directory
parent
b584279dc7
commit
923de09df4
|
@ -15,3 +15,5 @@ auth/js/auth.js.map
|
|||
.idea/
|
||||
|
||||
.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 * as ts from "typescript";
|
||||
import * as decl from "./declarator";
|
||||
import * as glob from "glob";
|
||||
import * as path from "path";
|
||||
import * as mkdirp from "mkdirp";
|
||||
|
||||
let source_files: string[] = [];
|
||||
let exclude_files: string[] = [];
|
||||
|
@ -87,4 +88,8 @@ source_files.forEach(file => {
|
|||
});
|
||||
});
|
||||
|
||||
mkdirp(path.normalize(path.dirname(base_path + "/" + target_file)), error => {
|
||||
if(error)
|
||||
throw error;
|
||||
writeFileSync(base_path + "/" + target_file, result);
|
||||
});
|
Loading…
Reference in New Issue