Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions src/apiCompilerConfig.json

This file was deleted.

19 changes: 15 additions & 4 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#! /usr/bin/env node
var { program } = require("commander");
var { exec } = require("child_process");
var { renameSync, rmdirSync, unlinkSync } = require("fs");
var { dirname, basename, join } = require("path");
var { unlinkSync } = require("fs");
var fs = require("fs");
var ts = require("typescript");
var compileConfig = require("./apiCompilerConfig.json");

program
.option("-i, --input <input>", "Input YAML schema file path")
Expand All @@ -19,7 +17,20 @@ program
const compileApi = (tsPath, outputPath) => {
// read ts file
const tsFile = fs.readFileSync(tsPath, "utf8");
const result = ts.transpile(tsFile, compileConfig);
const result = ts.transpile(tsFile, {
target: "ESNext",
esModuleInterop: true,
forceConsistentCasingInFileNames: false,
strict: false,
noImplicitAny: false,
skipLibCheck: true,
module: "ESNext",
declaration: false,
sourceMap: false,
moduleResolution: "node",
allowSyntheticDefaultImports: true,
emitDeclarationOnly: false,
});
console.log("Writing output to " + outputPath);
fs.writeFileSync(outputPath, result);
};
Expand Down