Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucaswerkmeister/cformat
Daemonized version of ceylon.formatter
https://github.com/lucaswerkmeister/cformat
ceylon daemon linux systemd unix unix-domain-socket
Last synced: 6 days ago
JSON representation
Daemonized version of ceylon.formatter
- Host: GitHub
- URL: https://github.com/lucaswerkmeister/cformat
- Owner: lucaswerkmeister
- License: apache-2.0
- Created: 2017-01-11T18:06:05.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-19T23:26:34.000Z (almost 8 years ago)
- Last Synced: 2024-10-30T02:37:49.234Z (about 2 months ago)
- Topics: ceylon, daemon, linux, systemd, unix, unix-domain-socket
- Language: C
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
cformat
=======A daemonized version of the `ceylon.formatter` command line tool (`ceylon format`),
mostly to showcase [ceylond].[ceylond]: https://github.com/lucaswerkmeister/ceylond
Installation
------------```sh
make install # install to home directory
systemctl --user daemon-reload # make user manager see cformat.{service,socket} units
systemctl --user enable --now cformat.socket # start daemon
```The `cformat` binary will be installed in `$(systemd-path user-binaries)`,
which is `~/.local/bin` with the default XDG paths.
Ensure that this directory is contained in your `PATH`.To uninstall, run the reverse commands:
```sh
systemctl --user disable --now cformat.service cformat.socket
make uninstall
systemctl --user daemon-reload
```Usage
-----`cformat` is a drop-in replacement for `ceylon format` (except for some *very* minor caveats around pipe mode):
```sh
cformat source # to format all Ceylon code in source
cformat source --to source-formatted # if you’re afraid I might break your code – directory structure is preserved
cformat source test-source # to format all Ceylon code in source and test-source
cformat source --and test-source --to formatted # to format all Ceylon code in source and test-source into formatted
```Performance
-----------The first invocation of `cformat`, which launches the daemon, will be slightly slower,
since the JVM has to load, run and optimize more code.
But after that, `cformat` can be vastly faster than `ceylon format`,
since the daemon just keeps running and is optimized further and further by the JVM:![](https://github.com/lucaswerkmeister/cformat/blob/master/benchmark/iterations-25.png)
License
-------The content of this repository is released under the ASL v2.0
as provided in the LICENSE file that accompanied this code.By submitting a “pull request” or otherwise contributing to
this repository, you agree to license your contribution under
the license mentioned above.cformat uses ceylond, which is published under the LGPLv3,
as provided in the LICENSE.LGPLv3 file that accompanied this code.