box.json
called scripts
that correspond to the interception points in CommandBox. Any script defined there will be ran on during that interception point. This allows you to prescribe arbitrary commands on a package-by-package basis. You may wish to set your package location any time you bump
a package version or perform a !git push
on publish
. Below is an example of some scripts
in a box.json
.server.json
for a server. Read more here.​run-script
commandpre
. After any package script is run, CommandBox will look for another package script with the same name, but prefixed with Post
. So if you have a package that contains 3 package scripts: foo
, preFoo
, and postFoo
, they will run in this order.prePreFoo
, it would run prior to preFoo
.interceptData.
and will use "dot notation" for nested structs. You can see if the docs on what intercept data is available to each interception point.preCommand
interception announcement receives a struct called commandInfo
with a key called commandString
which means your package script can access that via the following environment variable:env show
command in your package script to dump out all environment variables to the console.