Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temple migration #860

Merged
merged 9 commits into from Jan 31, 2017
Merged

Temple migration #860

merged 9 commits into from Jan 31, 2017

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Dec 5, 2015

ref: #851

I migrated Haml's engine backend to Temple.
In this PR, I didn't change compiler process to temple-AST-based one and make breaking changes. But now Haml::Parser and Haml::Compiler are on Temple Engine's pipeline.
There is no feature addition or performance improvement but refactoring for future maintainability.

Since I implemented Hamlit v2 with original Haml::Parser in k0kubun/hamlit#43, I know we can compile Haml::Parser::ParseNode into Temple AST (but not completely compatible about Haml::Helpers, though). This is just a first step for a whole migration.

module Haml
class TempleEngine < Temple::Engine
define_options(
:attr_wrapper => "'",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use 1.9 hash syntax since Haml requires ruby 1.9.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in k0kubun@57c6b43

@teeparham
Copy link
Member

On first glance, this looks great to me. 👏 👏 👏

@voondo
Copy link

voondo commented Aug 16, 2016

Thanks ! FYI, without it, I had terrible performance issues with Jruby 9.1.2.0.

@k0kubun k0kubun merged commit 865eee6 into haml:master Jan 31, 2017
@k0kubun k0kubun deleted the temple branch January 31, 2017 16:23
k0kubun added a commit that referenced this pull request Jan 31, 2017
@norman
Copy link
Contributor

norman commented Feb 1, 2017

Very excited to see this happening. Thanks @k0kubun for your fantastic work over the last few years on everything related to Haml!

k0kubun added a commit that referenced this pull request Feb 6, 2017
k0kubun added a commit that referenced this pull request Feb 27, 2017
k0kubun added a commit to k0kubun/hamlit that referenced this pull request May 27, 2017
I changed Haml to use Temple.

haml/haml#860
haml/haml#893
haml/haml#904

Hamlit is still faster than Haml for C extension and absence of
Haml::Buffer, which is required for Haml helpers.
@k0kubun k0kubun mentioned this pull request Oct 2, 2020
michaelzedwards added a commit to michaelzedwards/hamlit that referenced this pull request Feb 11, 2022
I changed Haml to use Temple.

haml/haml#860
haml/haml#893
haml/haml#904

Hamlit is still faster than Haml for C extension and absence of
Haml::Buffer, which is required for Haml helpers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants