├── .gitignore
├── .yardopts
├── Gemfile
├── LICENSE
├── README.md
├── Rakefile
├── assets.example.yml
├── bin
└── jammit
├── doc
├── Jammit.html
├── Jammit
│ ├── CommandLine.html
│ ├── Compressor.html
│ ├── Controller.html
│ ├── CssminCompressor.html
│ ├── DeprecationError.html
│ ├── Helper.html
│ ├── JsminCompressor.html
│ ├── MissingConfiguration.html
│ ├── OutputNotWritable.html
│ ├── PackageNotFound.html
│ ├── Packager.html
│ ├── Railtie.html
│ ├── Routes.html
│ ├── SassCompressor.html
│ └── Uglifier.html
├── _index.html
├── class_list.html
├── css
│ ├── common.css
│ ├── full_list.css
│ └── style.css
├── file_list.html
├── frames.html
├── index.html
├── js
│ ├── app.js
│ ├── full_list.js
│ └── jquery.js
├── method_list.html
└── top-level-namespace.html
├── index.html
├── jammit-logo.png
├── jammit.gemspec
├── lib
├── jammit.rb
└── jammit
│ ├── command_line.rb
│ ├── compressor.rb
│ ├── controller.rb
│ ├── cssmin_compressor.rb
│ ├── dependencies.rb
│ ├── helper.rb
│ ├── jsmin_compressor.rb
│ ├── jst.js
│ ├── packager.rb
│ ├── railtie.rb
│ ├── routes.rb
│ ├── sass_compressor.rb
│ └── uglifier.rb
├── rails
└── routes.rb
└── test
├── config
├── assets-broken.yml
├── assets-closure.yml
├── assets-compression-disabled.yml
├── assets-css.yml
├── assets-default.yml
├── assets-environment.yml
├── assets-erb.yml
├── assets-no-java.yml
├── assets-no-rewrite-relative-paths.yml
├── assets-sass.yml
├── assets-uglifier.yml
└── assets.yml
├── fixtures
├── jammed
│ ├── css_test-datauri.css
│ ├── css_test-line-break.css
│ ├── css_test-mhtml.css
│ ├── css_test-no-rewrite-relative-paths.css
│ ├── css_test-sass.css
│ ├── css_test-scss.css
│ ├── css_test-uncompressed.css
│ ├── css_test.css
│ ├── js_test-closure.js
│ ├── js_test-uglifier.js
│ ├── js_test-uncompressed.js
│ ├── js_test.js
│ ├── js_test_package_names.js
│ ├── js_test_with_templates.js
│ ├── jst_test-custom-namespace.js
│ ├── jst_test.js
│ ├── jst_test_diff_ext.js
│ ├── jst_test_diff_ext_and_nested.js
│ └── jst_test_nested.js
├── src
│ ├── nested
│ │ ├── double_nested
│ │ │ ├── double_nested.html.mustache
│ │ │ └── double_nested.jst
│ │ ├── nested1.css
│ │ ├── nested1.js
│ │ ├── nested1.jst
│ │ ├── nested2.css
│ │ ├── nested2.js
│ │ ├── nested2.jst
│ │ └── nested3.html.mustache
│ ├── template1.jst
│ ├── template2.jst
│ ├── test1.css
│ ├── test1.js
│ ├── test1.scss
│ ├── test2.css
│ ├── test2.js
│ └── test_fonts.css
└── tags
│ ├── css_includes.html
│ ├── css_individual_includes.html
│ ├── css_plain_includes.html
│ ├── css_print.html
│ └── js_individual_includes.html
├── public
└── embed
│ ├── DroidSansMono.eot
│ ├── DroidSansMono.ttf
│ ├── asterisk_orange.png
│ └── asterisk_yellow.png
├── test_helper.rb
└── unit
├── command_line_test.rb
├── test_closure_compressor.rb
├── test_compressor.rb
├── test_configuration.rb
├── test_in_the_wrong_directory.rb
├── test_jammit_controller.rb
├── test_jammit_helpers.rb
├── test_packager.rb
├── test_sass_compressor.rb
└── test_uglifier.rb
/.gitignore:
--------------------------------------------------------------------------------
1 | .yardoc
2 | *.gem
3 | example
4 | raws
5 | test/precache
6 | .ruby-version
7 | .DS_Store
8 | Gemfile.lock
9 |
--------------------------------------------------------------------------------
/.yardopts:
--------------------------------------------------------------------------------
1 | --title Jammit
2 | -m textile
3 | --protected
4 | --private
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gemspec
4 |
5 | group :development, :test do
6 | gem "rake", "~> 10.3"
7 | gem "rails", "~> 5.0"
8 | gem "cssmin", "~> 1.0"
9 | gem "jsmin", "~> 1.0"
10 | gem "yui-compressor", "~> 0.12"
11 | gem "closure-compiler", "~> 1.1"
12 | gem "uglifier", "~> 2.5"
13 | gem "sass", "~> 3.4"
14 | gem "pry"
15 | end
16 |
17 | group :development do
18 | gem "RedCloth", "~> 4.2"
19 | end
20 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009-2011 Jeremy Ashkenas, DocumentCloud
2 |
3 | Permission is hereby granted, free of charge, to any person
4 | obtaining a copy of this software and associated documentation
5 | files (the "Software"), to deal in the Software without
6 | restriction, including without limitation the rights to use,
7 | copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the
9 | Software is furnished to do so, subject to the following
10 | conditions:
11 |
12 | The above copyright notice and this permission notice shall be
13 | included in all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 | OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | _ _ __ __ __ __ ___ _____
2 | _ | |/_\ | \/ | \/ |_ _|_ _|
3 | | || / _ \| |\/| | |\/| || | | |
4 | \__/_/ \_\_| |_|_| |_|___| |_|
5 |
6 | Jammit is an industrial-strength asset packaging library for Rails, providing both the CSS and JavaScript concatenation and compression that you'd expect, as well as ahead-of-time gzipping, built-in JavaScript template support, and optional Data-URI / MHTML image embedding.
7 |
8 | - For documentation, usage, and examples, see: http://documentcloud.github.com/jammit/
9 | - To suggest a feature or report a bug: http://github.com/documentcloud/jammit/issues/
10 | - For internal source docs, see: http://documentcloud.github.com/jammit/doc/
11 |
12 | ## Installation
13 |
14 | `gem install jammit`
15 |
16 | ## License
17 |
18 | Jammit is released under the MIT license (see the LICENSE file).
19 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | require 'rake/testtask'
2 |
3 | desc 'Run all tests'
4 | task :test, [:path] do |task, args|
5 | ENV['RAILS_ENV'] = 'test'
6 | $LOAD_PATH.unshift(File.expand_path('test'))
7 | if args[:path]
8 | require_relative args[:path]
9 | else
10 | Dir['test/*/**/test_*.rb'].each {|test| require "./#{test}" }
11 | end
12 | end
13 |
14 | desc 'Generate YARD Documentation'
15 | task :doc do
16 | sh "mv README.md TEMPREADME"
17 | sh "rm -rf doc"
18 | sh "yardoc"
19 | sh "mv TEMPREADME README.md"
20 | end
21 |
22 | namespace :gem do
23 |
24 | desc 'Build and install the jammit gem'
25 | task :install do
26 | sh "gem build jammit.gemspec"
27 | sh "gem install #{Dir['*.gem'].join(' ')} --local --no-ri --no-rdoc"
28 | end
29 |
30 | desc 'Uninstall the jammit gem'
31 | task :uninstall do
32 | sh "gem uninstall -x jammit"
33 | end
34 |
35 | end
36 |
37 | task :default => :test
38 |
--------------------------------------------------------------------------------
/assets.example.yml:
--------------------------------------------------------------------------------
1 | package_assets: on
2 | embed_assets: on
3 | template_function: _.template
4 | package_path: packages
5 | javascript_compressor: closure
6 | compressor_options:
7 | compilation_level: ADVANCED_OPTIMIZATIONS
8 |
9 | javascripts:
10 | workspace:
11 | - public/javascripts/vendor/*.js
12 | - public/javascripts/application.js
13 | - public/javascripts/lib/bindable.js
14 | - public/javascripts/lib/set.js
15 | - public/javascripts/lib/*.js
16 | - public/javascripts/**/*.js
17 | - app/views/workspace/*.jst
18 |
19 | stylesheets:
20 | common:
21 | - public/stylesheets/vendor/reset.css
22 | - public/stylesheets/ui/*.css
23 | workspace:
24 | - public/stylesheets/pages/workspace.css
25 | empty:
26 | - public/stylesheets/pages/empty.css
27 |
28 |
--------------------------------------------------------------------------------
/bin/jammit:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby -rrubygems
2 | require 'pathname'
3 |
4 | APP_ROOT = File.dirname(Pathname.new(__FILE__).realpath)
5 | require File.join(APP_ROOT, '../lib/jammit/command_line.rb')
6 |
7 | Jammit::CommandLine.new
--------------------------------------------------------------------------------
/doc/Jammit/CssminCompressor.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 | Class: Jammit::CssminCompressor
8 |
9 | — Jammit
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
63 |
64 |
65 |
66 | Class: Jammit::CssminCompressor
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | Inherits:
75 |
76 | Object
77 |
78 |
79 | Object
80 |
81 | Jammit::CssminCompressor
82 |
83 |
84 | show all
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | Defined in:
97 | lib/jammit/cssmin_compressor.rb
98 |
99 |
100 |
101 |
102 |
Overview
103 |
104 |
Wraps CSSMin compressor to use the same API as the rest of
105 | Jammit’s compressors.
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 | Instance Method Summary
122 | (collapse )
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 | - (Object) compress (css)
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 | - (CssminCompressor) initialize (options = {})
153 |
154 |
155 |
156 |
157 |
158 |
159 | constructor
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 | A new instance of CssminCompressor.
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
Constructor Details
178 |
179 |
180 |
181 |
182 | - (CssminCompressor ) initialize (options = {})
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
Returns a new instance of CssminCompressor
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 | 4
204 | 5
205 |
206 |
207 | # File 'lib/jammit/cssmin_compressor.rb', line 4
208 |
209 | def initialize ( options = { } )
210 | end
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
Instance Method Details
221 |
222 |
223 |
224 |
225 |
226 | - (Object ) compress (css)
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 | 7
239 | 8
240 | 9
241 |
242 |
243 | # File 'lib/jammit/cssmin_compressor.rb', line 7
244 |
245 | def compress ( css )
246 | CSSMin . minify ( css )
247 | end
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
262 |
263 |
264 |
--------------------------------------------------------------------------------
/doc/Jammit/DeprecationError.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 | Exception: Jammit::DeprecationError
8 |
9 | — Jammit
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
63 |
64 |
65 |
66 | Exception: Jammit::DeprecationError
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | Inherits:
75 |
76 | StandardError
77 |
78 |
79 | Object
80 |
81 | StandardError
82 |
83 | Jammit::DeprecationError
84 |
85 |
86 | show all
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | Defined in:
99 | lib/jammit.rb
100 |
101 |
102 |
103 |
104 |
Overview
105 |
106 |
Jammit raises a DeprecationError if you try to use an outdated feature.
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
130 |
131 |
132 |
--------------------------------------------------------------------------------
/doc/Jammit/JsminCompressor.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 | Class: Jammit::JsminCompressor
8 |
9 | — Jammit
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
63 |
64 |
65 |
66 | Class: Jammit::JsminCompressor
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | Inherits:
75 |
76 | Object
77 |
78 |
79 | Object
80 |
81 | Jammit::JsminCompressor
82 |
83 |
84 | show all
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | Defined in:
97 | lib/jammit/jsmin_compressor.rb
98 |
99 |
100 |
101 |
102 |
Overview
103 |
104 |
Wraps JSMin compressor to use the same API as the rest of
105 | Jammit’s compressors.
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 | Instance Method Summary
122 | (collapse )
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 | - (Object) compress (js)
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 | - (JsminCompressor) initialize (options = {})
153 |
154 |
155 |
156 |
157 |
158 |
159 | constructor
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 | A new instance of JsminCompressor.
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
Constructor Details
178 |
179 |
180 |
181 |
182 | - (JsminCompressor ) initialize (options = {})
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
Returns a new instance of JsminCompressor
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 | 4
204 | 5
205 |
206 |
207 | # File 'lib/jammit/jsmin_compressor.rb', line 4
208 |
209 | def initialize ( options = { } )
210 | end
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
Instance Method Details
221 |
222 |
223 |
224 |
225 |
226 | - (Object ) compress (js)
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 | 7
239 | 8
240 | 9
241 |
242 |
243 | # File 'lib/jammit/jsmin_compressor.rb', line 7
244 |
245 | def compress ( js )
246 | JSMin . minify ( js )
247 | end
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
262 |
263 |
264 |
--------------------------------------------------------------------------------
/doc/Jammit/MissingConfiguration.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 | Exception: Jammit::MissingConfiguration
8 |
9 | — Jammit
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
63 |
64 |
65 |
66 | Exception: Jammit::MissingConfiguration
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | Inherits:
75 |
76 | NameError
77 |
78 |
79 | Object
80 |
81 | NameError
82 |
83 | Jammit::MissingConfiguration
84 |
85 |
86 | show all
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | Defined in:
99 | lib/jammit.rb
100 |
101 |
102 |
103 |
104 |
Overview
105 |
106 |
Jammit raises a MissingConfiguration exception when you try to load the
107 | configuration of an assets.yml file that doesn’t exist, or are missing
108 | a piece of required configuration.
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
132 |
133 |
134 |
--------------------------------------------------------------------------------
/doc/Jammit/OutputNotWritable.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 | Exception: Jammit::OutputNotWritable
8 |
9 | — Jammit
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
63 |
64 |
65 |
66 | Exception: Jammit::OutputNotWritable
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | Inherits:
75 |
76 | StandardError
77 |
78 |
79 | Object
80 |
81 | StandardError
82 |
83 | Jammit::OutputNotWritable
84 |
85 |
86 | show all
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | Defined in:
99 | lib/jammit.rb
100 |
101 |
102 |
103 |
104 |
Overview
105 |
106 |
Jammit raises an OutputNotWritable exception if the output directory for
107 | cached packages is locked.
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
131 |
132 |
133 |
--------------------------------------------------------------------------------
/doc/Jammit/PackageNotFound.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 | Exception: Jammit::PackageNotFound
8 |
9 | — Jammit
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
63 |
64 |
65 |
66 | Exception: Jammit::PackageNotFound
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | Inherits:
75 |
76 | NameError
77 |
78 |
79 | Object
80 |
81 | NameError
82 |
83 | Jammit::PackageNotFound
84 |
85 |
86 | show all
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | Defined in:
99 | lib/jammit.rb
100 |
101 |
102 |
103 |
104 |
Overview
105 |
106 |
Jammit raises a PackageNotFound
exception when a non-existent package is
107 | requested by a browser — rendering a 404.
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
131 |
132 |
133 |
--------------------------------------------------------------------------------
/doc/Jammit/Railtie.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 | Class: Jammit::Railtie
8 |
9 | — Jammit
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
63 |
64 |
65 |
66 | Class: Jammit::Railtie
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | Inherits:
75 |
76 | Rails::Railtie
77 |
78 |
79 | Object
80 |
81 | Rails::Railtie
82 |
83 | Jammit::Railtie
84 |
85 |
86 | show all
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | Defined in:
99 | lib/jammit/railtie.rb
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
121 |
122 |
123 |
--------------------------------------------------------------------------------
/doc/Jammit/Routes.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 | Module: Jammit::Routes
8 |
9 | — Jammit
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
63 |
64 |
65 |
66 | Module: Jammit::Routes
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | Defined in:
82 | lib/jammit/routes.rb
83 |
84 |
85 |
86 |
87 |
Overview
88 |
89 |
Rails 2.x routing module. Rails 3.x routes are in rails/routes.rb.
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 | Class Method Summary
106 | (collapse )
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 | + (Object) draw (map)
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 | Jammit uses a single route in order to slow down Rails’ routing speed by the absolute minimum.
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
Class Method Details
140 |
141 |
142 |
143 |
144 |
145 | + (Object ) draw (map)
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
Jammit uses a single route in order to slow down Rails’ routing speed
154 | by the absolute minimum. In your config/routes.rb file, call:
155 | Jammit::Routes.draw(map)
156 | Passing in the routing “map” object.
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 | 10
170 | 11
171 | 12
172 | 13
173 | 14
174 | 15
175 | 16
176 | 17
177 | 18
178 | 19
179 |
180 |
181 | # File 'lib/jammit/routes.rb', line 10
182 |
183 | def self . draw ( map )
184 | map . jammit " / #{ Jammit . package_path } /:package.:extension " , {
185 | :controller => ' jammit ' ,
186 | :action => ' package ' ,
187 | :requirements => {
188 | :extension => / .+ /
190 | }
191 | }
192 | end
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
207 |
208 |
209 |
--------------------------------------------------------------------------------
/doc/Jammit/SassCompressor.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 | Class: Jammit::SassCompressor
8 |
9 | — Jammit
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
63 |
64 |
65 |
66 | Class: Jammit::SassCompressor
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | Inherits:
75 |
76 | Object
77 |
78 |
79 | Object
80 |
81 | Jammit::SassCompressor
82 |
83 |
84 | show all
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | Defined in:
97 | lib/jammit/sass_compressor.rb
98 |
99 |
100 |
101 |
102 |
Overview
103 |
104 |
Wraps sass’ css compressor to use the same API as the rest of
105 | Jammit’s compressors.
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 | Instance Method Summary
122 | (collapse )
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 | - (Object) compress (css)
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 | Compresses css using sass’ CSS parser, and returns the compressed css.
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 | - (SassCompressor) initialize (options = {})
153 |
154 |
155 |
156 |
157 |
158 |
159 | constructor
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 | Creates a new sass compressor.
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
Constructor Details
178 |
179 |
180 |
181 |
182 | - (SassCompressor ) initialize (options = {})
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
Creates a new sass compressor. Jammit::SassCompressor doesn’t use
191 | any options, the options parameter is there for API
192 | compatibility.
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 | 7
206 | 8
207 |
208 |
209 | # File 'lib/jammit/sass_compressor.rb', line 7
210 |
211 | def initialize ( options = { } )
212 | end
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
Instance Method Details
223 |
224 |
225 |
226 |
227 |
228 | - (Object ) compress (css)
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
Compresses css using sass’ CSS parser, and returns the
237 | compressed css.
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 | 12
251 | 13
252 | 14
253 |
254 |
255 | # File 'lib/jammit/sass_compressor.rb', line 12
256 |
257 | def compress ( css )
258 | :: Sass :: Engine . new ( css , :syntax => :scss , :style => :compressed ) . render . strip
259 | end
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
274 |
275 |
276 |
--------------------------------------------------------------------------------
/doc/Jammit/Uglifier.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 | Class: Jammit::Uglifier
8 |
9 | — Jammit
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
63 |
64 |
65 |
66 | Class: Jammit::Uglifier
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | Inherits:
75 |
76 | Uglifier
77 |
78 |
79 | Object
80 |
81 | Uglifier
82 |
83 | Jammit::Uglifier
84 |
85 |
86 | show all
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | Defined in:
99 | lib/jammit/uglifier.rb
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
121 |
122 |
123 |
--------------------------------------------------------------------------------
/doc/_index.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 | Jammit
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
56 |
57 |
58 |
59 | Jammit
60 |
61 |
Alphabetic Index
62 |
63 |
64 |
Namespace Listing A-Z
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 | C
76 |
77 |
78 |
79 | CommandLine
80 |
81 | (Jammit)
82 |
83 |
84 |
85 |
86 | Compressor
87 |
88 | (Jammit)
89 |
90 |
91 |
92 |
93 | Controller
94 |
95 | (Jammit)
96 |
97 |
98 |
99 |
100 | CssminCompressor
101 |
102 | (Jammit)
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
123 |
124 |
125 |
126 | H
127 |
128 |
129 |
130 | Helper
131 |
132 | (Jammit)
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 | J
142 |
143 |
144 |
145 | Jammit
146 |
147 |
148 |
149 |
150 | JsminCompressor
151 |
152 | (Jammit)
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
173 |
174 |
175 |
188 |
189 |
190 |
191 | P
192 |
193 |
194 |
195 | PackageNotFound
196 |
197 | (Jammit)
198 |
199 |
200 |
201 |
202 | Packager
203 |
204 | (Jammit)
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 | R
217 |
218 |
219 |
220 | Railtie
221 |
222 | (Jammit)
223 |
224 |
225 |
226 |
227 | Routes
228 |
229 | (Jammit)
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 | S
239 |
240 |
241 |
242 | SassCompressor
243 |
244 | (Jammit)
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 | U
254 |
255 |
256 |
257 | Uglifier
258 |
259 | (Jammit)
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
279 |
280 |
281 |
--------------------------------------------------------------------------------
/doc/class_list.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Class List
19 |
20 |
21 |
22 |
32 |
33 |
34 |
49 |
Search:
50 |
51 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/doc/css/common.css:
--------------------------------------------------------------------------------
1 | /* Override this file with custom rules */
--------------------------------------------------------------------------------
/doc/css/full_list.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
4 | font-size: 13px;
5 | height: 101%;
6 | overflow-x: hidden;
7 | }
8 |
9 | h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; }
10 | .clear { clear: both; }
11 | #search { position: absolute; right: 5px; top: 9px; padding-left: 24px; }
12 | #content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; }
13 | #full_list { padding: 0; list-style: none; margin-left: 0; }
14 | #full_list ul { padding: 0; }
15 | #full_list li { padding: 5px; padding-left: 12px; margin: 0; font-size: 1.1em; list-style: none; }
16 | #noresults { padding: 7px 12px; }
17 | #content.insearch #noresults { margin-left: 7px; }
18 | ul.collapsed ul, ul.collapsed li { display: none; }
19 | ul.collapsed.search_uncollapsed { display: block; }
20 | ul.collapsed.search_uncollapsed li { display: list-item; }
21 | li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; }
22 | li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; }
23 | li { color: #888; cursor: pointer; }
24 | li.deprecated { text-decoration: line-through; font-style: italic; }
25 | li.r1 { background: #f0f0f0; }
26 | li.r2 { background: #fafafa; }
27 | li:hover { background: #ddd; }
28 | li small:before { content: "("; }
29 | li small:after { content: ")"; }
30 | li small.search_info { display: none; }
31 | a:link, a:visited { text-decoration: none; color: #05a; }
32 | li.clicked { background: #05a; color: #ccc; }
33 | li.clicked a:link, li.clicked a:visited { color: #eee; }
34 | li.clicked a.toggle { opacity: 0.5; background-position: bottom right; }
35 | li.collapsed.clicked a.toggle { background-position: top right; }
36 | #search input { border: 1px solid #bbb; -moz-border-radius: 3px; -webkit-border-radius: 3px; }
37 | #nav { margin-left: 10px; font-size: 0.9em; display: none; color: #aaa; }
38 | #nav a:link, #nav a:visited { color: #358; }
39 | #nav a:hover { background: transparent; color: #5af; }
40 | .frames #nav span:after { content: ' | '; }
41 | .frames #nav span:last-child:after { content: ''; }
42 |
43 | .frames #content h1 { margin-top: 0; }
44 | .frames li { white-space: nowrap; cursor: normal; }
45 | .frames li small { display: block; font-size: 0.8em; }
46 | .frames li small:before { content: ""; }
47 | .frames li small:after { content: ""; }
48 | .frames li small.search_info { display: none; }
49 | .frames #search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; }
50 | .frames #content.insearch #search { background-position: center right; }
51 | .frames #search input { width: 110px; }
52 | .frames #nav { display: block; }
53 |
54 | #full_list.insearch li { display: none; }
55 | #full_list.insearch li.found { display: list-item; padding-left: 10px; }
56 | #full_list.insearch li a.toggle { display: none; }
57 | #full_list.insearch li small.search_info { display: block; }
58 |
--------------------------------------------------------------------------------
/doc/css/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding: 0 20px;
3 | font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
4 | font-size: 13px;
5 | }
6 | body.frames { padding: 0 5px; }
7 | h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; }
8 | h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; }
9 | h1.title { margin-bottom: 10px; }
10 | h1.alphaindex { margin-top: 0; font-size: 22px; }
11 | h2 {
12 | padding: 0;
13 | padding-bottom: 3px;
14 | border-bottom: 1px #aaa solid;
15 | font-size: 1.4em;
16 | margin: 1.8em 0 0.5em;
17 | }
18 | h2 small { font-weight: normal; font-size: 0.7em; display: block; float: right; }
19 | .clear { clear: both; }
20 | .inline { display: inline; }
21 | .inline p:first-child { display: inline; }
22 | .docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; }
23 | .docstring h1 { font-size: 1.2em; }
24 | .docstring h2 { font-size: 1.1em; }
25 | .docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; }
26 | .summary_desc .object_link, .docstring .object_link { font-family: monospace; }
27 | .rdoc-term { padding-right: 25px; font-weight: bold; }
28 | .rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; }
29 |
30 | /* style for */
31 | #filecontents table, .docstring table { border-collapse: collapse; }
32 | #filecontents table th, #filecontents table td,
33 | .docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; }
34 | #filecontents table tr:nth-child(odd),
35 | .docstring table tr:nth-child(odd) { background: #eee; }
36 | #filecontents table tr:nth-child(even),
37 | .docstring table tr:nth-child(even) { background: #fff; }
38 | #filecontents table th, .docstring table th { background: #fff; }
39 |
40 | /* style for