33
33
* fw1 create app myApp --installFW1
34
34
* {code}
35
35
* .
36
- * Use "serverConfig" to generate a pre-defined server.json.
37
- * .
38
- * {code:bash}
39
- * fw1 create app myApp --serverConfig
40
- * {code}
41
- * .
42
36
* Use "startSever" to have CommandBox start a server that
43
37
* will run your app after generation.
44
38
* .
@@ -59,7 +53,6 @@ component displayname="FW/1 Create Application Command"
59
53
* @directory.hint The directory to create the app in. Defaults to current working directory.
60
54
* @installFW1.hint Install the latest stable version of FW/1 from ForgeBox.
61
55
* @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.
63
56
* @startServer.hint Have CommandBox start a server that will run your app after generation.
64
57
*/
65
58
public void function run (
@@ -68,9 +61,10 @@ component displayname="FW/1 Create Application Command"
68
61
string directory = getCWD (),
69
62
boolean package = true ,
70
63
boolean installFW1 = false ,
71
- boolean serverConfig = false ,
72
64
boolean startServer = false
73
65
) {
66
+ // Prevent any case issues with some Operating Systems
67
+ arguments .skeleton = arguments .skeleton .lCase ();
74
68
// This will make the directory canonical and absolute
75
69
arguments .directory = fileSystemUtil .resolvePath ( arguments .directory );
76
70
// Get the skeleton resource to use
@@ -96,19 +90,6 @@ component displayname="FW/1 Create Application Command"
96
90
if ( arguments .installFW1 ) {
97
91
command ( " install" ).params ( id = " fw1" , directory = arguments .directory ).run ();
98
92
}
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
- }
112
93
// Start a server to begin using generated app
113
94
if ( arguments .startServer ) { command ( " server start" ).run (); }
114
95
}
0 commit comments