$ git clone git@gist.github.com:75e3e365cfadcc1d72f7e3f1011af99c.git$ bundle install$ chmod -x ./slim2inline_css_html.sh
$ ./slim2inline_css_html.sh
| .bundle |
| <!DOCTYPE html> | |
| <html> | |
| <head><title>Example</title></head> | |
| <body><h1 style="color: tomato;">Example</h1></body> | |
| </html> |
| doctype html | |
| html | |
| head | |
| title | |
| | Example | |
| css: | |
| h1 { | |
| color: tomato; | |
| } | |
| body | |
| h1 | |
| | Example |
| source 'https://rubygems.org' | |
| gem 'slim' | |
| gem 'premailer' | |
| gem 'nokogiri' |
| GEM | |
| remote: https://rubygems.org/ | |
| specs: | |
| addressable (2.5.1) | |
| public_suffix (~> 2.0, >= 2.0.2) | |
| css_parser (1.5.0) | |
| addressable | |
| htmlentities (4.3.4) | |
| mini_portile2 (2.2.0) | |
| nokogiri (1.8.0) | |
| mini_portile2 (~> 2.2.0) | |
| premailer (1.10.4) | |
| addressable | |
| css_parser (>= 1.4.10) | |
| htmlentities (>= 4.0.0) | |
| public_suffix (2.0.5) | |
| slim (3.0.8) | |
| temple (>= 0.7.6, < 0.9) | |
| tilt (>= 1.3.3, < 2.1) | |
| temple (0.8.0) | |
| tilt (2.0.7) | |
| PLATFORMS | |
| ruby | |
| DEPENDENCIES | |
| nokogiri | |
| premailer | |
| slim | |
| BUNDLED WITH | |
| 1.15.1 |
| #!/bin/bash | |
| set -x | |
| bundle exec slimrb example.slim > example.tmp | |
| bundle exec premailer example.tmp > example.html | |
| rm example.tmp |