-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
44 lines (33 loc) · 805 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
require 'opal'
require 'opal-jquery'
require "opal/browser"
# Opal.use_gem("opal-browser")
# require 'browser'
require "pry"
require "coffee-script"
# binding.pry
desc "Build"
task :build do
File.open("public/the_game.js", "w+") do |out|
env = Opal::Environment.new
env.append_path "lib"
out << env["the_game"].to_s
out << env["math"].to_s
end
end
desc "build coffee"
task :build_coffee do
env = Sprockets::Environment.new
env.append_path "assets/javascripts"
File.open("public/index.js", "w+") do |out|
out << env["index.js.coffee"]
end
end
desc "build benchmarks"
task :build_benchmarks do
File.open("benchmarks/attr_accessor.js", "w+") do |out|
env = Opal::Environment.new
env.append_path "benchmarks"
out << env["attr_accessor"].to_s
end
end