typescript-to-lua
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -150,4 +150,18 @@ #!/usr/bin/env node | ||
else if (fs.statSync(configPath).isFile() && path.extname(configPath) === ".ts") { | ||
// if supplied project points to a .ts fiel we try to find the config | ||
configPath = ts.findConfigFile(path.dirname(configPath), ts.sys.fileExists); | ||
// Search for tsconfig upwards in directory hierarchy starting from the file path | ||
var dir = path.dirname(configPath).split(path.sep); | ||
var found = false; | ||
for (var i = dir.length; i > 0; i--) { | ||
var searchPath = dir.slice(0, i).join("/") + path.sep + "tsconfig.json"; | ||
// If tsconfig.json was found, stop searching | ||
if (ts.sys.fileExists(searchPath)) { | ||
configPath = searchPath; | ||
found = true; | ||
break; | ||
} | ||
} | ||
if (!found) { | ||
console.error("Tried to build project but could not find tsconfig.json!"); | ||
process.exit(1); | ||
} | ||
} | ||
@@ -154,0 +168,0 @@ commandLine.options.project = configPath; |
{ | ||
"name": "typescript-to-lua", | ||
"license": "MIT", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"repository": "https://github.com/Perryvw/TypescriptToLua", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -57,5 +57,6 @@ # TypescriptToLua | ||
{ | ||
"cmd": ["tstl", "-p", "$file"] | ||
"cmd": ["tstl", "-p", "$file"], | ||
"shell": true | ||
} | ||
``` | ||
Save this in your Sublime settings as a `TypeScriptToLua.sublime-build`. You can now select the TypeScriptToLua build system in `Tools > Build System` to build using the normal hotkey (`ctrl+B`), or if you have multiple TypeScript projects open, you can choose your compiler before building by pressing `ctrl+shift+B`. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75762
1424
62