-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
description("TODO: command description") { | ||
usage "grails ng-alain-curd" | ||
|
||
// TODO: populate arguments | ||
argument name: 'arg1', description: "arg1 description", required: true | ||
|
||
// TODO: populate flags | ||
flag name: 'flag1', description: "flag1 description" | ||
} | ||
|
||
if (args) { | ||
def modelName = args[0].toLowerCase() | ||
|
||
def createModuleCommand = "ng g ng-alain:module ${modelName}" | ||
def execute = createModuleCommand.execute(null, new File("../client")) | ||
execute.waitFor() | ||
|
||
createModuleCommand = "ng g ng-alain:curd curd -m ${modelName}" | ||
execute = createModuleCommand.execute(null, new File("../client")) | ||
execute.waitFor() | ||
} else { | ||
error "No argument specified" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
description( "TODO: command description" ) { | ||
usage "grails ng-alain-edit" | ||
|
||
// TODO: populate arguments | ||
argument name:'arg1', description:"arg1 description", required:true | ||
|
||
// TODO: populate flags | ||
flag name:'flag1', description:"flag1 description" | ||
} | ||
|
||
if(args) { | ||
def modelName = args[0] | ||
|
||
def createModuleCommand = "ng g ng-alain:module ${modelName}" | ||
def execute = createModuleCommand.execute(null, new File("../client")) | ||
execute.waitFor() | ||
|
||
createModuleCommand = "ng g ng-alain:edit edit -m ${modelName} -t=curd" | ||
execute = createModuleCommand.execute(null, new File("../client")) | ||
execute.waitFor() | ||
} | ||
else { | ||
error "No argument specified" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
description( "TODO: command description" ) { | ||
usage "grails ng-alain-list" | ||
|
||
// TODO: populate arguments | ||
argument name:'arg1', description:"arg1 description", required:true | ||
|
||
// TODO: populate flags | ||
flag name:'flag1', description:"flag1 description" | ||
} | ||
|
||
if(args) { | ||
def modelName = args[0] | ||
|
||
def createModuleCommand = "ng g ng-alain:module ${modelName}" | ||
def execute = createModuleCommand.execute(null, new File("../client")) | ||
execute.waitFor() | ||
|
||
createModuleCommand = "ng g ng-alain:list list -m ${modelName} -t=curd" | ||
execute = createModuleCommand.execute(null, new File("../client")) | ||
execute.waitFor() | ||
} | ||
else { | ||
error "No argument specified" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
description( "TODO: command description" ) { | ||
usage "grails ng-alain-view" | ||
|
||
// TODO: populate arguments | ||
argument name:'arg1', description:"arg1 description", required:true | ||
|
||
// TODO: populate flags | ||
flag name:'flag1', description:"flag1 description" | ||
} | ||
|
||
if(args) { | ||
def modelName = args[0] | ||
|
||
def createModuleCommand = "ng g ng-alain:module ${modelName}" | ||
def execute = createModuleCommand.execute(null, new File("../client")) | ||
execute.waitFor() | ||
|
||
createModuleCommand = "ng g ng-alain:view view -m ${modelName} -t=curd" | ||
execute = createModuleCommand.execute(null, new File("../client")) | ||
execute.waitFor() | ||
} | ||
else { | ||
error "No argument specified" | ||
} |