-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
29 lines (24 loc) · 797 Bytes
/
Copy pathmain.js
File metadata and controls
29 lines (24 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const fs = require('fs');
const lib = require('./FinalJSGenerator');
const utility = require('./UtilityModule');
/** The main function is only used
*/
function main() {
let rawData = fs.readFileSync('plugin/metaTranslations/model.json');
if (typeof rawData === 'undefined') {
console.log('unfound file');
} {
try {
} catch (e) {
console.log(e);
}
}
let model = JSON.parse(rawData);
fs.writeFile("test.js", lib.finalFormat( utility.parseJSONFile( 'plugin/metaTranslations/model.json') ), function (err) {
if (err) {
return console.log(err);
}
console.log("The file was saved!");
});
}
main();