mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-27 04:50:40 +00:00

This PR
* removes the crate `askama_derive_standalone`,
* makes `askama_derive` a normal library, and
* adds the proc-macro crate `askama_macros`,
Before, it was not possible for another crate to re-export
`askama::Template` in a useful way, because the generated code assumes
that it has access to an `extern crate askama`.
`askama_derive` will export the function `derive_template()` like
`askama_derive_standalone` did, but it has an additional argument to
accept a `TokenStream` that should contain (an) statement(s) to define
the identifier `askama`, e.g. `quote! { extern crate askama; }`.
The new proc-macro crate `askama_macros` now defines the derive-macro
`Template` by calling `askama_derive::derive_template()`.
Prior art: [`encase`] → [`encase_derive`] → [`encase_derive_impl`];
[2298a3e].
[`encase`]: <https://crates.io/crates/encase/0.11.0>
[`encase_derive`]: <https://crates.io/crates/encase_derive/0.11.0>
[`encase_derive_impl`]: <https://crates.io/crates/encase_derive_impl/0.11.0>
[2298a3e]: <2298a3efd5
>
35 lines
696 B
TOML
35 lines
696 B
TOML
[default]
|
|
locale = "en-us"
|
|
|
|
[files]
|
|
extend-exclude = [
|
|
# generated files
|
|
"book/ethicalads-theme.css",
|
|
"fuzzing/fuzz/artifacts/",
|
|
"fuzzing/fuzz/corpus/",
|
|
"target/",
|
|
"askama_parser/tests/*.txt",
|
|
"testing/templates/fuzzed-*",
|
|
# we copied the files verbatim including any typos :)
|
|
"askama_parser/benches",
|
|
"askama_derive/benches",
|
|
# filler texts
|
|
"*/benches/strings.inc",
|
|
# too many false positives
|
|
"testing/tests/gen_ws_tests.py",
|
|
]
|
|
|
|
[default.extend-words]
|
|
# It's actually called that in the ASCII standard
|
|
Enquiry = "Enquiry"
|
|
|
|
# French words
|
|
exemple = "exemple"
|
|
existant = "existant"
|
|
|
|
# used in tests
|
|
Ba = "Ba"
|
|
fo = "fo"
|
|
Fo = "Fo"
|
|
sur = "sur"
|