https://github.com/senselogic/prettify
Source code prettifier.
https://github.com/senselogic/prettify
beautifier c code cpp css d formatter html js json less php prettifier sass scss source xml
Last synced: 3 months ago
JSON representation
Source code prettifier.
- Host: GitHub
- URL: https://github.com/senselogic/prettify
- Owner: SenseLogic
- License: gpl-3.0
- Created: 2017-05-17T15:09:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-08-20T19:04:54.000Z (over 2 years ago)
- Last Synced: 2025-06-10T22:50:09.273Z (8 months ago)
- Topics: beautifier, c, code, cpp, css, d, formatter, html, js, json, less, php, prettifier, sass, scss, source, xml
- Language: D
- Size: 101 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README

# Prettify
Source code prettifier.
## Features
* Make source code files with the following extensions adhere to [Coda](https://github.com/senselogic/CODA) spacing rules :
* PHP : php.
* HTML : html, htm, xml, twig.
* CSS : css, less, pepss, sass, scss, styl.
* JavaScript : js, jsx, ts, tsx, json.
* C : c, h.
* C++ : cxx, hxx, cpp, hpp.
* D : d.
* Dart : dart.
## Installation
Install the [DMD 2 compiler](https://dlang.org/download.html) (using the MinGW setup option on Windows).
Build the executable with the following command line :
```bash
dmd -m64 prettify.d
```
## Command line
```bash
prettify [options] file_path_filter
```
### Options
```bash
--backup BACKUP_FOLDER/ : store the original files in this folder
--output OUTPUT_FOLDER/ : store the fixed files in this folder
```
### Examples
```bash
prettify ".//*.d"
```
Prettifies all D files in the current folder and its subfolders.
```bash
prettify --backup BACKUP_FOLDER/ "*.php"
```
Prettifies all PHP files after having stored the original files in "BACKUP_FOLDER/".
```bash
prettify --output OUTPUT_FOLDER/ "*.js"
```
Prettifies all JavaScript files and store the fixed files in "OUTPUT_FOLDER/".
## Version
1.0
## Author
Eric Pelzer (ecstatic.coder@gmail.com).
## License
This project is licensed under the GNU General Public License version 3.
See the [LICENSE.md](LICENSE.md) file for details.