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.
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.
Run the following cargo command to install or update ludtwig:
cargo install ludtwig
You can install cargo here: https://www.rust-lang.org/learn/get-started
If you don't want to install the rust toolchain / cargo you can still use the manual installation below.
Download the latest release binary for your operating system and put it in your PATH for easy access.
After installation have a look at ludtwig --help
for more information. It should be self explanatory.
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: cargo build --release
(the produced binary will be here: target/release/ludtwig
)
Run tests with: 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'
Copyright (c) 2020 Malte Janz
ludtwig
is distributed under the terms of the MIT License.
See the LICENSE file for details.
If you build this project locally or use the distributed binary keep also the following licenses in mind: - ludtwig-parser - MIT - tokio - MIT - clap - MIT / Apache 2.0 - ansi_term - MIT - walkdir - MIT / UNLICENSE - async-trait - 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. Also deeper dependencies are not listed.