https://github.com/michaelborn/spotlesscf
Format source code in CFML using the Spotless java library
https://github.com/michaelborn/spotlesscf
beautify cfml coldbox-modules formatter spotless
Last synced: 7 months ago
JSON representation
Format source code in CFML using the Spotless java library
- Host: GitHub
- URL: https://github.com/michaelborn/spotlesscf
- Owner: michaelborn
- License: bsd-3-clause
- Created: 2022-01-24T14:16:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-25T17:57:05.000Z (over 3 years ago)
- Last Synced: 2025-01-13T10:27:56.862Z (9 months ago)
- Topics: beautify, cfml, coldbox-modules, formatter, spotless
- Language: ColdFusion
- Homepage: https://michaelborn.github.io/spotlessCF/
- Size: 296 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SpotlessCF
A CFML wrapper for the "Spotless" java library which provides code formatting over many many languages.
[](https://github.com/michaelborn/spotlessCF/actions/workflows/release.yml)
See [Spotless on GitHub](https://github.com/diffplug/spotless) for more info.
## Installation
1. Install this module. `box install spotlessCF`
2. Add the module's `lib/` directory to your application's `javaSettings.loadPaths`:```js
this.javaSettings.loadPaths = [
// ...
expandPath( "/modules/spotlessCF/lib/spotless-lib-2.22.0/" )
];
```Restart your app. The CF engine should "pick up" the spotless jar and load it into the application.
## Configuration
There are two ways to configure spotlessCF module settings:
1. Using a [`.env` file](#env-file-and-commandbox-dotenv)
2. Using [Module Settings](#module-settings)### Env File and `commandbox-dotenv`
```bash
# settings go here
SPOTLESS_SETTING=blabla
```### Module Settings
Add the following to `config/ColdBox.cfc` and update as necessary:
```js
moduleSettings = {
spotlessCF = {
// settings go here
}
}
```## API Docs
The spotlessCF class documentation is auto-generated via [DocBox](https://docbox.ortusbooks.com/) and hosted on Github Pages at [michaelborn.github.io/spotlessCF/](https://michaelborn.github.io/spotlessCF/)
## Contributing
I could use help with this!
## Thanks
Special thanks to the [Spotless library](https://github.com/diffplug/spotless). I could'na dunnit without ya. 😉