slim-embedded-minify
module Slim
class Embedded < Filter
class TagEngine < Engine
prepend Minify::Tag
end
class JavaScriptEngine < TagEngine
prepend Minify::Javascript
end
ennd
Slide 16
Slide 16 text
slim-embedded-minify
module Slim
class Embedded < Filter
module Minify
module Javascript
include Tag
def on_slim_embedded(engine, body, attrs)
mini
fi
ed_body = minify(body)
super(engine, mini
fi
ed_body, attrs)
end
ennnnd
slimembedcop
html
ruby:
if File.exists?("foo.txt")
message = "Yay!"
else
message = "Nooo!"
end
h1
#{
message}
Γग़ͯ͠3VCP$PQʹͯ͠
ղੳͯ͠Β͏
Slide 25
Slide 25 text
slimembedcop
❯ slimembedcop dummy.slim
Inspecting 1 f
i
le
W
Offenses:
dummy.slim:3
:
8
:
W
:
[Correctable] Lint/
DeprecatedClassMethods: File.exists? is
deprecated in favor of File.exist
?.
if File.exists?("foo.txt")
^^^^^^^^^^^^