Box.json
The box.json file must be in your root of your project and it is a JSON file that describes your project, dependencies, development dependencies, installation data, and CommandBox command data.
Note Please note that you can add as many settings or alter the box.json structure to meet your needs when developing commands. This makes our descriptor incredibly flexible.

Initialize a package

To initialize any folder as a package, run the init command.
1
init
Copied!
You can pass as many properties to the init command as you want using named parameters.
1
init name="My Package" slug=my-package version=1.0.0
Copied!
You can also do a question/answer style wizard by adding the --wizard flag.
1
init --wizard
Copied!

Sample box.json

Below you will see all the possible options that we currently support in CommandBox. Note, not all have been implemented yet. If you have suggestions or updates to our package descriptor, please do not hesitate to Contact Us!
1
{
2
"name" : "Package Name",
3
// ForgeBox unique slug
4
"slug" : "",
5
// semantic version of your package
6
"version" : "1.0.0.buildID",
7
// author of this package
8
"author" : "Luis Majano <[email protected]>",
9
// location of where to download the package, overrides ForgeBox location
10
"location" : "URL,Git/svn endpoint,etc",
11
// install directory where this package should be placed once installed, if not
12
// defined it then installs were the CommandBox command was executed.
13
"directory" : "",
14
// This boolean bit determines if the container directory will contain a sub-directory according to
15
// the package slug name, the default is true
16
"createPackageDirectory" : "boolean",
17
// If this is set, then we will use this name for the package sub-directory, instead of the slug name
18
"packageDirectory" : ""
19
// project homepage URL
20
"Homepage" : "URL",
21
// documentation URL
22
"Documentation" : "URL",
23
// source repository, valid keys: type, URL
24
"Repository" : {
25
"type" : "git,svn,mercurial", "URL" : ""
26
},
27
// bug issue management URL
28
"Bugs" : "URL",
29
// ForgeBox short description
30
"shortDescription" : "short description",
31
// ForgeBox big description, if not set it looks for a Readme.md, Readme, Readme.txt
32
"description" : "",
33
// Install instructions, if not set it looks for a instructions.md, instructions, instructions.txt
34
"instructions" : "",
35
// Change log, if not set, it looks for a changelog.md, changelog or changelog.txt
36
"changelog" : ""
37
// ForgeBox contribution type
38
"type" : "1 from forgebox available types",
39
// ForgeBox keywords, array of strings
40
"keywords" : [ "groovy", "module" ],
41
// Bit that designates the package as a private ForgeBox package.
42
// Private packages are not publicly accessible, but still
43
// offer all the benefits of ForgeBox.
44
"private" : "boolean",
45
// cfml engines it supports, type and version
46
"engines" : [
47
{ "type" : "railo", "version" : ">=4.1.x" },
48
{ "type" : "lucee", "version" : ">=4.5.x" },
49
{ "type" : "adobe", "version" : ">=10.0.0" }
50
],
51
// default project URL if not using our start server commands
52
"ProjectURL" : "http://railopresso.local/myApp",
53
// license array of licenses it can have
54
"License" : [
55
{ "type" : "MIT", "URL" : "" }
56
]
57
// contributors array of strings or structs: name,email,url
58
"Contributors" : [ "Luis Majano", "Luis Majano <[email protected]>", {name="luis majano", email="", url=""} ],
59
// dependencies, a shortcut for latest version is to use the * string
60
"Dependencies" : {
61
"coldbox" : "x" // latest version from ForgeBox
62
"slug" : "version", // a specific version from ForgeBox
63
"slug" : "local filepath", //disallowed from forgebox registration
64
"slug" : "URL",
65
"slug" : "Git/svn endpoint"
66
},
67
// only needed on development
68
"DevDependencies" : {
69
// Same as above, but not installed in production
70
},
71
// Tracks install locations so uninstall can work.
72
"installPaths" : {
73
"coldbox" : "coldbox" // relative to package root (no leading slash)
74
"feeds" : "modules/feeds", // relative to package root (no leading slash)
75
"Name" : "C:\\foo\\bar" // Outside root, so full path
76
},
77
// array of strings of files to ignore when installing the package similar to .gitignore pattern spec
78
"ignore" : [ "logs/*", "readme.md" ]
79
// testbox integration
80
"testbox" : {
81
// the uri location of the test runner for is app or several with slug names
82
"runner" : [
83
{ "cf9" : "http://cf9cboxdev.jfetmac/coldbox/testing/runner.cfm" },
84
{ "railo" : "http://railocboxdev.jfetmac/coldbox/testing/runner.cfm" }
85
],
86
"runner" : ""
87
"Labels" : [],
88
"Reporter" : "",
89
"ReporterResults" : "/test/results"
90
"Bundles" : [ "test.specs" ]
91
"Directory" : { mapping : "test.specs", recurse: true },
92
// directories or files to watch for changes, if they change, then tests execute
93
"Watchers" : [ "/model" ] ,
94
// after tests run we can do a notification report summary
95
"Notify" : {
96
"Emails" : [],
97
"Growl" : address,
98
// URL to hit with test report
99
"URL" : ""
100
}
101
}
102
}
Copied!