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

More debugging docs #153

Merged
merged 1 commit into from
Oct 12, 2017
Merged

More debugging docs #153

merged 1 commit into from
Oct 12, 2017

Conversation

obilodeau
Copy link
Member

Allowing the rubyists a chance to comment

@obilodeau obilodeau added this to the 1.1.0 milestone Oct 5, 2017
@obilodeau
Copy link
Member Author

Fails on Jruby 😞, I might only document it and not make it a dev dep

HACKING.adoc Outdated
triggering statements and use the templates directly instead of debugging
compiled templates. You can call the slim templates directly with:

bundle exec asciidoctor --trace -T templates/ examples/customcss.adoc
Copy link
Member

Choose a reason for hiding this comment

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

You must also load slim-htag (-r slim-htag).

Copy link
Member Author

Choose a reason for hiding this comment

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

I can't tell you what's going on but it's not necessary. With or without -r slim-htag it will yield the same files:

$ bundle exec asciidoctor --trace -T templates/ examples/customcss.adoc
$ sha1sum examples/customcss.html 
6caf3d92da489f44919cefd8d9b803d2aeee559a  examples/customcss.html
$ bundle exec asciidoctor --trace -T templates/ -r slim-htag examples/customcss.adoc
$ sha1sum examples/customcss.html
6caf3d92da489f44919cefd8d9b803d2aeee559a  examples/customcss.html

To make sure I'm not doing anything wrong, I made further tests:

# calling asciidoctor-revealjs straight (after a fresh rake build)
$ bundle exec asciidoctor-revealjs examples/customcss.adoc 
$ sha1sum examples/customcss.html 
6caf3d92da489f44919cefd8d9b803d2aeee559a  examples/customcss.html

# modifying templates
$ echo -e "p\n  | Intruder alert" >> templates/document.html.slim 
# running without -r slim-htag
$ bundle exec asciidoctor --trace -T templates/ examples/customcss.adoc
$ sha1sum examples/customcss.html 
fdcceb5a1bf892713f9cec52b7902249eaff65d5  examples/customcss.html
# ^ output changed

# w/o a rake build, still get same file as before
$ bundle exec asciidoctor-revealjs examples/customcss.adoc 
$ sha1sum examples/customcss.html 
6caf3d92da489f44919cefd8d9b803d2aeee559a  examples/customcss.html

So I would assess that the -r slim-htag is not necessary. At least in my environment.

@jirutka
Copy link
Member

jirutka commented Oct 5, 2017

Well, who would hack/debug with JRuby anyway (with insanely slow cold start)?

@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rake', '~> 10.4.2'
s.add_development_dependency 'asciidoctor-doctest', '= 2.0.0.beta.4'
s.add_development_dependency 'pry', '~> 0.10.4'
s.add_development_dependency 'pry-byebug'
Copy link
Member

Choose a reason for hiding this comment

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

You can conditionally include it only for non-jruby engine.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's done

@obilodeau
Copy link
Member Author

Gave this one some love tonight. Feel free to take another look.

@obilodeau obilodeau merged commit d358ba2 into asciidoctor:master Oct 12, 2017
@obilodeau obilodeau deleted the pry-byebug branch October 12, 2017 23:53
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

2 participants