Last active
August 29, 2015 14:11
-
-
Save fkchang/1cdb146630e254ad2598 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'opal' | |
require 'browser' | |
puts "1" | |
$document.ready? | |
puts "2" | |
$document.ready? do | |
puts "I am ready" | |
alert :ready | |
end | |
puts "3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler' | |
Bundler.require | |
run Opal::Server.new { |s| | |
s.append_path '.' | |
s.main = 'app-embeddable' | |
s.index_path = 'index-embeddable-svr.html' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'opal', :git => "git://github.com/opal/opal.git" | |
gem 'opal-jquery', :git => "git://github.com/opal/opal-jquery.git" | |
gem 'opal-browser', :git => "git://github.com/opal/opal-browser.git" | |
gem 'lissio', github: 'meh/lissio' | |
gem 'paggio', github: 'meh/paggio' | |
gem 'opal-rspec', :git => "git://github.com/opal/opal-rspec.git" | |
gem 'rake' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GIT | |
remote: git://github.com/meh/lissio.git | |
revision: a3cfd7ebfad9889942a896244eb68de54a08b51f | |
specs: | |
lissio (0.1.0.beta3) | |
opal (>= 0.6.0) | |
opal-browser (>= 0.2.0.beta1) | |
rack | |
thor | |
uglifier | |
GIT | |
remote: git://github.com/meh/paggio.git | |
revision: f019da1b19310d1b958062bd859fa43246637187 | |
specs: | |
paggio (0.2.4) | |
GIT | |
remote: git://github.com/opal/opal-browser.git | |
revision: c909f1bfab40b354001feeafeefc2a2d2ed8f7b9 | |
specs: | |
opal-browser (0.2.0.beta1) | |
opal | |
paggio | |
GIT | |
remote: git://github.com/opal/opal-jquery.git | |
revision: f5332667d436be038efa49ce771aabbe7402a03d | |
specs: | |
opal-jquery (0.3.0.beta1) | |
opal (~> 0.7.0.beta1) | |
GIT | |
remote: git://github.com/opal/opal-rspec.git | |
revision: 2174236d9ce9512859e681290c9b759f3c59d92b | |
specs: | |
opal-rspec (0.4.0.beta4) | |
opal (~> 0.7.0.beta1) | |
GIT | |
remote: git://github.com/opal/opal.git | |
revision: 533d7ac43a8f0d8e3bf9fde91d6d8811b998eecc | |
specs: | |
opal (0.7.0.beta4) | |
hike (~> 1.2) | |
sourcemap (~> 0.1.0) | |
sprockets (>= 2.2.3, < 4.0.0) | |
tilt (~> 1.4) | |
GEM | |
remote: https://rubygems.org/ | |
specs: | |
execjs (2.2.2) | |
hike (1.2.3) | |
json (1.8.1) | |
multi_json (1.10.1) | |
rack (1.6.0) | |
rake (10.4.2) | |
sourcemap (0.1.1) | |
sprockets (2.12.3) | |
hike (~> 1.2) | |
multi_json (~> 1.0) | |
rack (~> 1.0) | |
tilt (~> 1.1, != 1.3.0) | |
thor (0.19.1) | |
tilt (1.4.1) | |
uglifier (2.6.0) | |
execjs (>= 0.3.0) | |
json (>= 1.8.0) | |
PLATFORMS | |
ruby | |
DEPENDENCIES | |
lissio! | |
opal! | |
opal-browser! | |
opal-jquery! | |
opal-rspec! | |
paggio! | |
rake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<script src="/assets/app-embeddable.js"></script> | |
</head> | |
<body> | |
<div id='mydiv'> | |
<h1 id="h1">An h1 headline inside of #mydiv</h1> | |
</div> | |
<h2 id="h2">An h2 headline standalone</h2> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment