Skip to content

Commit 129e009

Browse files
author
Tony Junkes
committed
Fix for issue #4
Changed app skeletons names to be lowercase and will simply lCase() the skeleton name supplied by the user to avoid future issues.
1 parent 8ad314e commit 129e009

File tree

4 files changed

+5
-24
lines changed

4 files changed

+5
-24
lines changed

ModuleConfig.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ component {
55
"skeletons": "#modulePath#/resources/skeletons/",
66
"templates": "#modulePath#/resources/templates/"
77
},
8-
"version": "2.0.0"
8+
"version": "2.1.0"
99
};
1010
}
1111

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# fw1-commands (v2.0.0)
1+
# fw1-commands (v2.1.0)
22
### A collection of CommandBox commands for working with FW/1
33

44
## Installation

box.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name" : "FW/1 Commands",
33
"slug" : "fw1-commands",
4-
"version" : "2.0.0",
4+
"version" : "2.1.0",
55
"author" : "Tony Junkes - @cfchef",
66
"location" : "https://github.com/framework-one/fw1-commands/archive/master.zip",
77
"Homepage" : "https://github.com/framework-one/fw1-commands",

commands/fw1/create/app.cfc

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@
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

Comments
 (0)