These are some specifics to caboose that you may need to know
/project_root/ |-- app/ | |-- controllers/ | | |-- application_controller.coffee | |-- helpers/ | | |-- application_helper.coffee | |-- views/ | | |-- application/ | | | |-- index.html.ejs | | |-- layouts/ | | |-- application.html.ejs |-- config/ | |-- application.coffee | |-- environments/ | | |-- development.coffee | | |-- production.coffee | |-- initializers/ | |-- middleware.coffee | |-- routes.coffee |-- lib/ |-- package.json |-- public/ |-- README.md
Throughout caboose, file and class naming is very important. These conventions allow for flexibility and ease of use.
Caboose introduces the import keyword as an easy and concise way to pull in controllers and helpers.
import 'SomeController' import 'SomeViewHelper'
actually translates to
SomeController = Caboose.get('SomeController') SomeViewHelper = Caboose.get('SomeViewHelper')
The import keyword can be extended to recognize other modules too. The caboose-model plugin does this by adding support for model loading through the import keyword.
The enforcement of naming conventions and the directory where files are located make all of this possible.