config2ts 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/config2ts.d.ts +1 -2
- package/lib/config2ts.js +1 -8
- package/package.json +1 -1
package/lib/config2ts.d.ts
CHANGED
|
@@ -5,6 +5,5 @@ export declare const Convert: {
|
|
|
5
5
|
};
|
|
6
6
|
export declare function GetTsString(filePath: any): any;
|
|
7
7
|
export declare function GetTsStringFromFileList(fileList: any): any;
|
|
8
|
-
export declare function GetHeaderInfo(): string;
|
|
9
8
|
export declare function GetValidFileList(fileList: any): any;
|
|
10
|
-
export declare function startConvert(dir: string, outDir: string, merge:
|
|
9
|
+
export declare function startConvert(dir: string, outDir: string, merge: string | null): void;
|
package/lib/config2ts.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Convert = void 0;
|
|
4
4
|
exports.GetTsString = GetTsString;
|
|
5
5
|
exports.GetTsStringFromFileList = GetTsStringFromFileList;
|
|
6
|
-
exports.GetHeaderInfo = GetHeaderInfo;
|
|
7
6
|
exports.GetValidFileList = GetValidFileList;
|
|
8
7
|
exports.startConvert = startConvert;
|
|
9
8
|
var path = require("path");
|
|
@@ -11,8 +10,7 @@ var fs = require("fs");
|
|
|
11
10
|
var d3 = require("d3");
|
|
12
11
|
var json5 = require("json5");
|
|
13
12
|
var changeCase = require("change-case");
|
|
14
|
-
var toml = require(
|
|
15
|
-
var packageJson = require('../package.json');
|
|
13
|
+
var toml = require("toml");
|
|
16
14
|
var EnumStr = 'Enum';
|
|
17
15
|
var EnumIndexStr = 'EnumIndex';
|
|
18
16
|
var EnumArrayString = 'Enum[]';
|
|
@@ -192,11 +190,6 @@ function GetTsStringFromFileList(fileList) {
|
|
|
192
190
|
return GetTsString(filePath);
|
|
193
191
|
}).join('\n\n');
|
|
194
192
|
}
|
|
195
|
-
function GetHeaderInfo() {
|
|
196
|
-
var header = "export let config2ts_version = \"".concat(packageJson.version, "\";\n\n");
|
|
197
|
-
header += "export let config2ts_build_timestamp = ".concat(Date.now().toString(), ";\n\n");
|
|
198
|
-
return header;
|
|
199
|
-
}
|
|
200
193
|
function GetValidFileList(fileList) {
|
|
201
194
|
return fileList.filter(function (filePath) {
|
|
202
195
|
return exports.Convert[GetFileExt(filePath)] != null;
|