Commit graph

199 commits

Author SHA1 Message Date
Mitchell Hanberg
301963f06b Bump v0.6.0 2021-05-22 01:13:58 -04:00
Mitchell Hanberg
99de9ad137
Update README.md 2021-05-21 10:50:31 -04:00
Mitchell Hanberg
b2bd06d037 Add some docs 2021-05-13 21:28:15 -04:00
Mitchell Hanberg
3b00fedb27 update version in readme 2021-05-13 20:56:40 -04:00
Mitchell Hanberg
0b55cf1cec Bump v0.6.0-rc.1 2021-05-13 00:31:00 -04:00
Mitchell Hanberg
5150a93e38 emit live view compatible component and slot markup
- requires the development branch of live_view currently, if you are
  going to be using live view

ci

Docs

Raise minimum elixir version to 1.9

There is some bug in EEx that was fixed in 1.9 and I can't be bothered
to make it backwards compatible with the bug.

ugh

Remove commented out line
2021-05-13 00:21:43 -04:00
Mitchell Hanberg
73b6973a74 Boost minimum tested version to 1.9
Add erlang 22
2021-05-13 00:21:43 -04:00
Mitchell Hanberg
851f6415fe Slots!
Integration test for slots

Format integration test project

Hide slots assign in temple prefixed key

Won't compile temple related assigns when calling Utils.runtime_attrs

Update component docs with slots usage
2021-05-13 00:21:43 -04:00
Mitchell Hanberg
f7197ede4a Update readme with goals 2021-05-13 00:21:43 -04:00
Mitchell Hanberg
074241be4e Rename Temple.EEx to Temple.Generator 2021-04-11 17:27:02 -04:00
Mitchell Hanberg
07a1d5d451 Rename ast properties to align with given ast
The properties were either not needed at all, or were named back when
there was only one node type. now that each node is it's own struct,
they really don't need to share any common properties.
2021-04-10 11:08:06 -04:00
Mitchell Hanberg
d40ff3e0b1 Allow components to be used with inline blocks
Fixes #116
2021-04-09 00:28:52 -04:00
Mitchell Hanberg
fe3aed5df7 Some cleanup 2021-04-09 00:16:30 -04:00
Mitchell Hanberg
b35b9b6d91 Rename a dir and shrink the test matrix 2021-04-09 00:16:30 -04:00
Mitchell Hanberg
acf53760c3 Format a file 2021-04-09 00:16:30 -04:00
Mitchell Hanberg
7aba19a87d Update the setup elixir action for github action 2021-04-09 00:16:30 -04:00
Mitchell Hanberg
41f9b94d0f Hook the AST generation in to the temple macros
- Removes the old way
- Removes the ability to compact an element
2021-04-09 00:16:30 -04:00
Mitchell Hanberg
8bb4245761 Output AST to EEx 2021-04-09 00:16:30 -04:00
Mitchell Hanberg
4e9c7e95b4 Generate AST 2021-04-09 00:16:30 -04:00
Mitchell Hanberg
358b5ea4cc Start porting parsers to use AST 2021-04-09 00:16:30 -04:00
Mitchell Hanberg
9d6f7c176d Remove slack readme badge 2021-03-22 20:14:47 -04:00
Michel Belleville
6fe46cbb49
the alias goes in the view module (#107) 2021-01-20 18:03:41 -05:00
Mitchell Hanberg
8377a04ab3
Update README.md 2021-01-02 15:34:53 -05:00
Mitchell Hanberg
e97302149b rename default branch 2021-01-02 13:34:19 -05:00
Mitchell Hanberg
c35307cb66 ci: Bump min elixir version on ci for int. tests 2021-01-02 13:33:14 -05:00
Mitchell Hanberg
c4059b3a6e Bump v0.6.0-rc.0 2021-01-02 13:24:49 -05:00
Mitchell Hanberg
ced2f6ab66 feat: New Component API 2021-01-02 13:22:03 -05:00
Mitchell Hanberg
271567dc8f
Update ci.yml 2020-12-06 22:59:58 -05:00
Mitchell Hanberg
bde40756ee
Update ci.yml 2020-12-06 22:58:10 -05:00
Mitchell Hanberg
b55708099e
Update FUNDING.yml 2020-12-06 22:53:18 -05:00
Mitchell Hanberg
396978b36c Update test 2020-11-04 20:21:32 -05:00
Mitchell Hanberg
aa9a7dd578 Update changelog 2020-11-04 20:11:26 -05:00
Mitchell Hanberg
da3dd6b214 Update README 2020-11-04 19:58:35 -05:00
Mitchell Hanberg
5c5edfa67f case expressions 2020-11-04 19:58:35 -05:00
Mitchell Hanberg
db110d4241
Merge pull request #99 from Bastes/patch-1
Typo fix in README.md (@behavior => @behaviour)
2020-10-20 09:41:50 -04:00
Michel Belleville
f75774c626
Typo fix in README.md (@behavior => @behaviour) 2020-10-20 15:38:46 +02:00
Mitchell Hanberg
7d28953543
Merge pull request #94 from mhanberg/dependabot/hex/ex_doc-0.22.6
Bump ex_doc from 0.22.1 to 0.22.6
2020-09-17 09:42:13 -04:00
dependabot-preview[bot]
7d1c243623
Bump ex_doc from 0.22.1 to 0.22.6
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.22.1 to 0.22.6.
- [Release notes](https://github.com/elixir-lang/ex_doc/releases)
- [Changelog](https://github.com/elixir-lang/ex_doc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.22.1...v0.22.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-17 10:36:23 +00:00
Mitchell Hanberg
459084285f Fix formatting 2020-08-09 10:10:53 -04:00
Mitchell Hanberg
265c413960 Allow element attrs to be evaluated at runtime
Before this change, only keyword list literals could be passed to
elements. If they had non-literals as values, then those would compile
to EEx expressions.

This allows a non-literal to be passed as attrs and have the entire thing
compile to an EEx expression, which will pass the non-literal to a
"runtime_attrs" function, which evaluates a keyword list into a safe
string.

That last part might need to be reworked if the user is not using
the Phoenix.HTML.Engine EEx Engine.
2020-08-09 10:07:27 -04:00
Mitchell Hanberg
ba49ce2b4b Update README 2020-07-25 12:07:00 -04:00
Mitchell Hanberg
d4b81d60de Account for the third arg of AST being an atom 2020-07-24 21:27:53 -04:00
Mitchell Hanberg
a26c2e3720
Merge pull request #91 from mhanberg/module-components
Module based Component API
2020-07-24 20:39:58 -04:00
Mitchell Hanberg
7be82e003f Module based Component API 2020-07-24 15:54:38 -04:00
Mitchell Hanberg
113a75a7eb
Merge pull request #90 from mhanberg/better-parsers
Parser abstraction
2020-07-23 21:19:58 -04:00
Mitchell Hanberg
8e872e619b Retry integration tests up to 2 more times 2020-07-23 21:17:11 -04:00
Mitchell Hanberg
ecc34e084c Remove unused dep 2020-07-23 21:10:11 -04:00
Mitchell Hanberg
efd9d84070 Simplify component applicable? callback 2020-07-23 21:06:23 -04:00
Mitchell Hanberg
59e64dce3b Parser abstraction
This implements a Temple.Parser behavior. This contracts requires a
`applicable/1` and `run/2` functions to be defined.

`applicable/1` is passed the unparsed AST, and returns true or false
as to whether this parser module should be run.

`run/2` is passed the unparsed AST as well as the buffer. It should add
parsed markup to the buffer.

The function either returns `:ok` if the AST is done, or
`{:component_applied, ast}`. If the latter is returned, the parser pass
starts over with the return ast.
2020-07-23 20:59:10 -04:00
Mitchell Hanberg
7bf649c4b5 Correctly parse do blocks
Did not correctly parse expressions with do blocks
where the expression had two or more arguments before
the block.
2020-07-22 21:34:50 -04:00