Add initial Lime config command
This commit is contained in:
@@ -5,6 +5,7 @@ enum Command {
|
||||
|
||||
BUILD;
|
||||
CLEAN;
|
||||
CONFIG;
|
||||
DEPLOY;
|
||||
DISPLAY;
|
||||
UPDATE;
|
||||
|
||||
@@ -89,6 +89,10 @@ class CommandLineTools {
|
||||
|
||||
displayHelp ();
|
||||
|
||||
case "config":
|
||||
|
||||
displayConfig ();
|
||||
|
||||
case "setup":
|
||||
|
||||
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 {
|
||||
|
||||
displayInfo ();
|
||||
@@ -1151,6 +1180,8 @@ class CommandLineTools {
|
||||
|
||||
}
|
||||
|
||||
Sys.putEnv ("LIME_CONFIG", config);
|
||||
|
||||
}
|
||||
|
||||
if (FileSystem.exists (config)) {
|
||||
|
||||
Reference in New Issue
Block a user