Module Inception
ColdBox 4 allows you to nest modules within modules up to the Nth degree. You can package a module with other modules that can even contain other modules within them. It really opens a great opportunity for better packaging, delivery and a further break from monolithic applications. To use, just create a modules folder in your module and drop the modules there as well. You can also just create a box.json in the root of your module and let CommandBox manage your module dependencies. Here is an example of the ColdBox ORM Module:
1
{
2
"name" : "ColdBox ORM Extensions",
3
"version" : "1.0.3",
4
"author" : "Luis Majano <[email protected]",
5
"slug" : "cborm",
6
"type" : "modules",
7
"homepage" : "http://www.coldbox.org",
8
"documentation" : "http://wiki.coldbox.org",
9
"repository" : { "type" : "git", "url" : "https://github.com/ColdBox/cbox-cborm" },
10
"shortDescription" : "Enhances the ColdFusion ORM with tons of utilities.",
11
"license" : [
12
{ "type" : "Apache2", "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" }
13
],
14
"contributors" : [
15
"Brad Wood <[email protected]>", "Curt Gratz <[email protected]>", "Joel Watson <[email protected]>"
16
],
17
"dependencies" :{
18
"cbvalidation" : "1.0.2"
19
},
20
"ignore":[
21
"**/.*",
22
"tests",
23
"apidocs",
24
"*/.md"
25
]
26
}
Copied!
Last modified 1yr ago
Copy link