Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Mention using ERBTracker with HAML in README #46

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,22 @@ You'll need to use a special comment format to call those out:
```

The pattern used to match these is `/# Template Dependency: ([^ ]+)/`, so it's important that you type it out just so. You can only declare one template dependency per line.


Supported Templating Languages
------------------------------

Only ERB is officially supported by the dependency tracker, but the ERB Tracker may work with other formats.

Add this initializer to enable HAML or Slim support and check the results with `rake cache_digests:dependencies`

```ruby
# config/initializers/cache_digests.rb

# Enable experimental HAML support with the ERB Dependency Tracker
CacheDigests::DependencyTracker.register_tracker :haml, CacheDigests::DependencyTracker::ERBTracker

Choose a reason for hiding this comment

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

Maybe add a similar line for Slim

  # Or enable experimental Slim support with the ERB Dependency Tracker
  CacheDigests::DependencyTracker.register_tracker :slim, CacheDigests::DependencyTracker::ERBTracker


# Enable experimental Slim support with the ERB Dependency Tracker
CacheDigests::DependencyTracker.register_tracker :slim, CacheDigests::DependencyTracker::ERBTracker
```