CommandBox : CLI, Package Manager, REPL & More
Search…
5.5.0
Introduction
About This Book
Authors
Overview
Release History
Getting Started Guide
Setup
Usage
IDE Integrations
Config Settings
Embedded Server
Package Management
Task Runners
Helpful Commands
Token Replacements
Checksums
Code Quality Tools
ask and confirm
Deploying CommandBox
TestBox Integration
Developing For CommandBox
ForgeBox Enterprise
Introduction
Storage
Commands
Usage
Powered By
GitBook
Token Replacements
One common thing in builds is replacing a token placeholder across all files, or perhaps certain files defined by a file globbing pattern. We've got a special command for that.
From the CLI
1
tokenReplace path=/tests/*.cfc token="@@
[email protected]
@" replacement=`package version`
Copied!
From CFML
1
command
(
'tokenReplace'
)
2
.
params
(
3
path
=
"/tests/*.cfc"
,
4
token
=
"@@
[email protected]
@"
,
5
replacement
=
command
(
'package version'
).
run
()
6
)
7
.
run
();
Copied!
Previous
Helpful Commands
Next
Checksums
Last modified
1mo ago
Copy link
Edit on GitHub
Contents
From the CLI
From CFML