3333* fw1 create app myApp --installFW1
3434* {code}
3535* .
36- * Use "serverConfig" to generate a pre-defined server.json.
37- * .
38- * {code:bash}
39- * fw1 create app myApp --serverConfig
40- * {code}
41- * .
4236* Use "startSever" to have CommandBox start a server that
4337* will run your app after generation.
4438* .
@@ -59,7 +53,6 @@ component displayname="FW/1 Create Application Command"
5953 * @directory.hint The directory to create the app in. Defaults to current working directory.
6054 * @installFW1.hint Install the latest stable version of FW/1 from ForgeBox.
6155 * @package.hint Generate a box.json to make the current directory a package.
62- * @serverConfig.hint Generate a server.json to control how CommandBox starts a server for the app.
6356 * @startServer.hint Have CommandBox start a server that will run your app after generation.
6457 */
6558 public void function run (
@@ -68,9 +61,10 @@ component displayname="FW/1 Create Application Command"
6861 string directory = getCWD (),
6962 boolean package = true ,
7063 boolean installFW1 = false ,
71- boolean serverConfig = false ,
7264 boolean startServer = false
7365 ) {
66+ // Prevent any case issues with some Operating Systems
67+ arguments .skeleton = arguments .skeleton .lCase ();
7468 // This will make the directory canonical and absolute
7569 arguments .directory = fileSystemUtil .resolvePath ( arguments .directory );
7670 // Get the skeleton resource to use
@@ -96,19 +90,6 @@ component displayname="FW/1 Create Application Command"
9690 if ( arguments .installFW1 ) {
9791 command ( " install" ).params ( id = " fw1" , directory = arguments .directory ).run ();
9892 }
99- // Create server.json
100- if ( arguments .serverConfig ) {
101- // Write server.json content and print success
102- savecontent variable = " serverJson" {
103- writeOutput ( ' {' );
104- writeOutput ( cr & chr (9 ) & ' "heapSize": "512",' );
105- writeOutput ( cr & chr (9 ) & ' "host": "localhost",' );
106- writeOutput ( cr & chr (9 ) & ' "rewritesEnable": false,' );
107- writeOutput ( cr & ' }' );
108- }
109- fileWrite ( arguments .directory & " /server.json" , serverJson );
110- print .line ().greenLine ( " Created server.json successfully." );
111- }
11293 // Start a server to begin using generated app
11394 if ( arguments .startServer ) { command ( " server start" ).run (); }
11495 }
0 commit comments