sinatra-minify 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +18 -4
- data/VERSION +1 -1
- data/lib/sinatra/minify/compressor.rb +3 -1
- data/lib/sinatra/minify/package.rb +4 -1
- data/sinatra-minify.gemspec +2 -2
- metadata +3 -3
data/README.md
CHANGED
@@ -15,7 +15,19 @@ Add these to your app's main file:
|
|
15
15
|
|
16
16
|
Add this to your app's `Rakefile`:
|
17
17
|
|
18
|
-
|
18
|
+
desc "Builds the minified CSS and JS assets."
|
19
|
+
task :minify do
|
20
|
+
require 'init.rb' # <= change this
|
21
|
+
puts "Building..."
|
22
|
+
|
23
|
+
files = Sinatra::Minify::Package.build(Main) # <= change this
|
24
|
+
files.each { |f| puts " * #{File.basename f}" }
|
25
|
+
puts "Construction complete!"
|
26
|
+
end
|
27
|
+
|
28
|
+
# Be sure to change the values above. They assume that your main
|
29
|
+
# file is called 'init.rb' and that your Application class is called
|
30
|
+
# 'Main'.
|
19
31
|
|
20
32
|
Now add your JS/CSS packages in `config/assets.yml` (relative to your app's root path).
|
21
33
|
The files are are assumed to be in `public/js` and `public/css` by default.
|
@@ -58,13 +70,15 @@ Usage tips
|
|
58
70
|
Building minified files
|
59
71
|
-----------------------
|
60
72
|
|
61
|
-
|
73
|
+
After editing your Rakefile, the minified files can be built by typing:
|
62
74
|
|
63
|
-
rake minify
|
75
|
+
rake minify
|
64
76
|
|
65
77
|
This creates files called `<package_name>.min.js` (and `.css`) in your `public/js` and
|
66
78
|
`public/css` folders.
|
67
79
|
|
80
|
+
Make sure your app is running on `http://localhost:4567` before doing this!
|
81
|
+
|
68
82
|
NOTE: Building of minified files is NOT done automatically! You must call this explicitly.
|
69
83
|
Add it to your Capistrano deploy scripts or something.
|
70
84
|
|
@@ -147,4 +161,4 @@ See more of our work on [www.sinefunc.com](http://www.sinefunc.com)!
|
|
147
161
|
Copyright
|
148
162
|
---------
|
149
163
|
|
150
|
-
(c) 2010 Rico Sta. Cruz, Cyril David and Sinefunc, Inc. See the LICENSE file for more details.
|
164
|
+
(c) 2010 Rico Sta. Cruz, Cyril David and Sinefunc, Inc. See the LICENSE file for more details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
data/sinatra-minify.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{sinatra-minify}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Rico Sta. Cruz", "Cyril David", "Sinefunc, Inc."]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-06-02}
|
13
13
|
s.description = %q{sinatra-minify is an extension for Sinatra to compress assets.}
|
14
14
|
s.email = %q{info@sinefunc.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 3
|
9
|
+
version: 0.2.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Rico Sta. Cruz
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-
|
19
|
+
date: 2010-06-02 00:00:00 +08:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|