- Add `path` argument for custom component path
- Add `js`, `css`, `template` arguments for custom component script, style and template files
- Add `force` argument to force rewrite the existing component
- Add `verbose` option to make the command more informative
- Add `dry-run` option to simulate the command without writing to disk
- related #249
* more helpful message when filling invalid slot name
* Update tests/test_templatetags.py
Co-authored-by: Emil Stenström <emil@emilstenstrom.se>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add missing import; set -> typing.Set
* fix after rebase
* set -> typing.Set
* let -> typing.List
* Reduce duplicated effort; extend helpfulness; add extra comments
code qa
---------
Co-authored-by: Emil Stenström <emil@emilstenstrom.se>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: lemontheme <lemontheme@gmail.com>
* Add 'default' slot option + implicit fills; tests; docs
* Differentiate between standard fillnodes and implicitfillnodes on type lvl
* Reworking slot-fill rendering logic. Simplifying component interfact. Add new get_string_template method
* First working implementation of chainmap instead of stacks for slot resolution
* Stop passing FillNode to Component initalizer -> better decoupling
* Treat fill name and alias and component name as filterexpression, dropping namedvariable
* Name arg of if_filled tags and slots must be string literal
* Introduce safer_staticfiles app to ignore .py,.html as security measure. Docs up-to-date
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Partial implementation fill-tags plus update tests
Implement {% fill %} tags. Next: update tests.
Bring back support for {%slot%} blocks for bckwrd-compat and implement ambig. resolution policy
Update tests to use fill blocks. Add extra checks that raise errors
Add new tests for fill-slot nesting
Update README. Editing still required
remove unused var ctxt after flake8 complaint
fix flake8 warning about slotless f-string
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Add new slot aliases in fill context. Clean up rendering logic in Component. Update docs.
fix flake8, isort, black errors
Refactor duplicated name validation
Add if_filled tag + elif_filled...else_filled...endif_filled for cond. slots
Fix mistake in do_if_filled() docstring
Upload templates for tests! D'oh
Incorporate PR feedback
Drop Literal type hint; Use isort off-on instead of skip in tests
Treat all fill,slot,if_filled,component names as variables
Reset sampleproject components
Add test for variable filled name
Update examples in docs
I have removed the exception raising when a variable without quotes is given, and keep the variable name until the render function where I'm resolving it if it's a String (which means it's a variable, not a component) then I'm moving the slot parts which relies on the component from __init__ to render after getting the component.