Skip to content

Instantly share code, notes, and snippets.

@adambeynon
Created February 23, 2015 22:25
Show Gist options
  • Save adambeynon/4feee9cb0a282a513203 to your computer and use it in GitHub Desktop.
Save adambeynon/4feee9cb0a282a513203 to your computer and use it in GitHub Desktop.
Opal.build_manifest do
# find application.rb in our load path and compile that (and all dependencies)
compile "application"
# we want all templates included, but use our custom haml (react.js style) parser
each_glob "templates/**/*.haml" do |file|
special_haml_compile file
end
# compile these default gems that might not be required inside application.rb
%w(opal-router opal-model opal-view).each do |g|
compile_gem g
end
# main entry point, so we don't have this in other test env
compile_string <<-RUBY
Document.ready? do
Application.run
end
RUBY
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment