You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
danielgolub edited this page Sep 24, 2014
·
2 revisions
Introduction
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.
Generating files
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}.
Renaming files
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}.