-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.rb
33 lines (29 loc) · 1.06 KB
/
app.rb
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
require 'rubygems'
require 'bundler'
Bundler.setup(:default, :development)
require 'jsus'
require 'sinatra/base'
Jsus::Middleware.settings = {
:cache => true,
:cache_path => File.expand_path("../public/javascripts/jsus", __FILE__),
:packages_dir => File.expand_path("../vendor/js", __FILE__),
:cache_pool => false,
:includes_root => File.expand_path("../vendor/js", __FILE__),
:log_method => :console
}
Jsus.verbose = true
class JsusApplication < Sinatra::Base
use Jsus::Middleware
set :static, true
get '/' do
[
200, {"Content-Type" => "text/plain"},
"Ping! Use jsus urls to see some magic.\n\n" <<
"E.g.: /javascripts/jsus/require/CKEditor.js\n" <<
"/javascripts/jsus/include/CKEditor.js\n" <<
"/javascripts/jsus/require/CKEditor~CKEditor:core.config~CKEditor:core.command.js\n" <<
"/javascripts/jsus/require/CKEditor:plugins.div.plugin+CKEditor:plugins.domiterator.plugin.js\n" <<
"Or even: /javascripts/jsus/require/**:*undo*.js\n"
]
end
end # class JsusApplication