Add initial Lime config command

This commit is contained in:
Joshua Granick
2016-10-17 15:41:37 -07:00
parent 7b6dd93ddf
commit 22f5a9da16
2 changed files with 32 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ enum Command {
BUILD; BUILD;
CLEAN; CLEAN;
CONFIG;
DEPLOY; DEPLOY;
DISPLAY; DISPLAY;
UPDATE; UPDATE;

View File

@@ -89,6 +89,10 @@ class CommandLineTools {
displayHelp (); displayHelp ();
case "config":
displayConfig ();
case "setup": case "setup":
platformSetup (); platformSetup ();
@@ -755,6 +759,31 @@ class CommandLineTools {
} }
private function displayConfig ():Void {
var config = getLimeConfig ();
if (words.length == 0) {
LogHelper.print (File.getContent (Sys.getEnv ("LIME_CONFIG")));
} else {
if (config.defines.exists (words[0])) {
LogHelper.print (config.defines.get (words[0]));
} else {
LogHelper.error ("\"" + words[0] + "\" is undefined");
}
}
}
private function displayHelp ():Void { private function displayHelp ():Void {
displayInfo (); displayInfo ();
@@ -1151,6 +1180,8 @@ class CommandLineTools {
} }
Sys.putEnv ("LIME_CONFIG", config);
} }
if (FileSystem.exists (config)) { if (FileSystem.exists (config)) {