-
Notifications
You must be signed in to change notification settings - Fork 0
Codengine CLI
To generate and rename controllers and views more quickly, we added a simple Command-line interface to Codengine. To enable it please make sure NodeJS is installed on your computer and permit the engine file at the framework's root directory:
chmod 777 engine
You can always type ./engine -help
to display the available commands, or ./engine -V
to print your engine's version.
To create a new controller simply use the ./engine new controller {name}
command (to make it even easier you can also use ./engine new c {name}
).
Your controller will contain the default Controller's template and rename the class name automatically for you.
As you might think, to create a new view use ./engine new view {name}
/ ./engine new v {name}
.
Sometimes you need to create a controller and its own view, and for that use ./engine new stack {name}
/ ./engine new s {name}
.
To rename a controller, type ./engine rename controller {oldname} {newname}
/ ./engine rename c {oldname} {newname}
.
To rename a view, type ./engine rename view {oldname} {newname}
/ ./engine rename v {oldname} {newname}
.
To rename a stack (controller and view), type ./engine rename stack {oldname} {newname}
/ ./engine rename s {oldname} {newname}
.