Skip to content

Instantly share code, notes, and snippets.

@huyderman
Created July 24, 2017 11:13
Show Gist options
  • Save huyderman/5c3f0963aac39d4c202cd37a26c90182 to your computer and use it in GitHub Desktop.
Save huyderman/5c3f0963aac39d4c202cd37a26c90182 to your computer and use it in GitHub Desktop.
Riot mixin for adding a BottleJS container to a tag
require! bottlejs: { pop }
# Riot mixin for adding a BottleJS container to a tag
#
# @param [String|Bottle] @bottle A Bottle or the name of the bottle to pop
# @return [Object]
export Molotov = ->
@bottle = if typeof! it is \Bottle
then it
else pop it
init: ->
container: ~> @bottle.container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment