-
-
Notifications
You must be signed in to change notification settings - Fork 180
Closed
Labels
Description
//package.json
"scripts": {
"build": "tstl -p src/vscripts/tsconfig.json"
}
// src/vscripts/tsconfig.json
{
"include": [
"../vscripts",
"../shared",
"../service"
],
"compilerOptions": {
"outDir": "../../dist"
},
"tstl": {
"luaTarget": "JIT",
"sourceMapTraceback": true,
}
}
I used to compile with this line of instructions,For some reasons, I want to execute through *. ts. but It doesnt work.
import { join } from "path";
import { transpileProject } from "typescript-to-lua";
const result = transpileProject(
join(__dirname, 'src', "tsconfig.json"),
{
rootDir: join(__dirname, 'src'),
outDir: join(__dirname, 'dist' )
});
console.log(result.diagnostics);
// src/tsconfig.json
{
"include": [
"../src",
"../shared",
"../service"
],
"tstl": {
"luaTarget": "JIT",
"sourceMapTraceback": true,
}
}
I want to configure the input directory and output directory in the script, not in the cli
can you help me?