Ludtwig

GitHub GitHub Workflow Status (branch) GitHub release (latest by date including pre-releases) GitHub all releases

A CLI tool for developers that tries to speedup the development workflow while working with templating (.twig) files. It focuses mainly on formatting the files with a uniform code style and detecting mistakes. It is only a "formatter" that can be run locally or in the pipeline, it will not report anything to your IDE.

Status / Disclaimer

Ludtwig is currently in an early development state. Please use the tool with caution and validate the changes that is has made (backup your files before running this). Feel free to create new issues and help to steer this project in the right direction.

Current Features

Current Use cases

How to use Ludtwig?

Basically download the latest release build and run the executable from the command line. Have a look at ludtwig --help for more information.

Basic Concepts

Structure (subject to change)

Development setup

Make sure you have Rust installed on your system.
Clone this repository.

Run the project with parameters: cargo run -- filaA.twig
Build the project for production with (output in target/release/ludtwig): cargo build --release
Run tests with (only of the application not it's dependencies like twig parser): cargo test

If you want to benchmark the performance of the release build you could use Hyperfine and run it like so:
hyperfine -i 'ludtwig -o ./output ./my-template-folder'

License

Copyright (c) 2020 Malte Janz
ludtwig is distributed under the terms of the MIT License.
See the LICENSE file for details.

Dependencies / License notices*

If you build this project locally or use the distributed binary keep also the following licenses in mind: - nom - MIT - tokio - MIT - clap - MIT / Apache 2.0 - ansi_term - MIT - walkdir - MIT / UNLICENSE - async-trait - MIT / Apache 2.0

If you run the tests / benchmarks locally you also should keep these licenses in mind (not included in distributed binary): - criterion - MIT / Apache 2.0

For testing purposes this repository also includes code from the following sources (not included in distributed binary): - Shopware - MIT - SwagMigrationAssistant - MIT

Special thanks goes to the authors of these dependencies.
*This list and the links may not be up to date and you should do your own research