jekyll-assets 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,38 @@
1
+ ### 0.2.3 (2013-01-07)
2
+
3
+ * Add built-in bourbon support as: `require "jekyll-assets/bourbon"`.
4
+
5
+
6
+ ### 0.2.2 (2013-01-07)
7
+
8
+ * Add built-in compass support as: `require "jekyll-assets/compass"`.
9
+
10
+
11
+ ### 0.2.1 (2012-12-31)
12
+
13
+ * Expose `Jekyll::Site` instance into assets as `site`.
14
+ * Improve assets comparison (when required with different logical names).
15
+
16
+
17
+ ### 0.2.0 (2012-12-28)
18
+
19
+ * Remove logging.
20
+ * Fix `asset_path` helper within assets.
21
+ * Remove `bundles` configuration option.
22
+ All require assets are auto-bundled now.
23
+
24
+
25
+ ### 0.1.1 (2012-12-21)
26
+
27
+ * Add `baseurl` configuration option.
28
+
29
+
30
+ ### 0.1.1 (2012-10-23)
31
+
32
+ * Small bug fixes and improvements.
33
+ * Add `{% asset <logical_path> %}` Liquid tag.
34
+
35
+
36
+ ### 0.1.0 (2012-10-22)
37
+
38
+ * First public release.
data/README.md CHANGED
@@ -17,6 +17,11 @@ Jekyll plugin, that adds Rails-alike assets pipeline, that means that:
17
17
  compiled to JavaScript functions.
18
18
  - Automaticaly adds MD5 fingerprint suffix for _cache busting_. That means
19
19
  that your `app.css` will become `app-908e25f4bf641868d8683022a5b62f54.css`.
20
+ - [Compass][compass] and [Bourbon][bourbon] built-in support.
21
+ See "Custom Vendors" below.
22
+
23
+ [compass]: http://compass-style.org/
24
+ [bourbon]: http://bourbon.io/
20
25
 
21
26
  Jekyll-Assets uses fabulous [Sprockets][sprockets] under the hood, so you may
22
27
  refer to Rails guide about [Asset Pipeline][rails-guide] for detailed
@@ -185,6 +190,67 @@ That's all. Feel free to ask questions if any on [twitter][twitter],
185
190
  [e-mail]: mailto://ixti@member.fsf.org
186
191
 
187
192
 
193
+ ## Custom Vendors
194
+
195
+ Sometimes you would like to have some 3rd-party vendors. For this purposes,
196
+ normally all you have to do is to override default assets sources in config:
197
+
198
+ ``` yaml
199
+ assets:
200
+ sources:
201
+ - _assets/images
202
+ - _assets/javascripts
203
+ - _assets/stylesheets
204
+ - _vendors/bootstrap/stylesheets
205
+ - _vendors/bootstrap/javascripts
206
+ ```
207
+
208
+ But sometimes this is not enough. For example, with compass. As jekyll-assets
209
+ uses Sprockets internally, you can simply append "global" paths into it. Just
210
+ add following line into your `_plugins/ext.rb` file:
211
+
212
+ ``` ruby
213
+ require "sprockets"
214
+
215
+ Sprockets.append_path "/my/vendor"
216
+ ```
217
+
218
+ That's it, now jekyll-assets will try to look for assets inside `/my/vendor`
219
+ path first.
220
+
221
+
222
+ ### Built-in Vendors Support
223
+
224
+ For your comfort jekyll-assets has built-in support for some popular libraries.
225
+
226
+
227
+ #### Compass Support
228
+
229
+ Require `jekyll-assets/compass` to enable, e.g.:
230
+
231
+ ``` ruby
232
+ require "jekyll-assets"
233
+ require "jekyll-assets/compass"
234
+ ```
235
+
236
+ Now you can add `@import "compass"` in your SASS assets to get Compass goodies.
237
+
238
+ *Notice* that if you want to use other than default Compass plugins/frameworks,
239
+ you must require them BEFORE `jekyll-assets/compass`.
240
+
241
+
242
+ #### Bourbon Support
243
+
244
+ Require `jekyll-assets/bourbon` to enable, e.g.:
245
+
246
+ ``` ruby
247
+ require "jekyll-assets"
248
+ require "jekyll-assets/bourbon"
249
+ ```
250
+
251
+ Now you can add `@import "bourbon"` in your SASS assets to get Bourbon goodies.
252
+
253
+
188
254
  ## The Directive Processor
189
255
 
190
256
  *Note:* This section extracted from [Sprockets][sprockets] README.
@@ -23,6 +23,7 @@ Gem::Specification.new do |gem|
23
23
  gem.add_development_dependency "guard-rspec"
24
24
  gem.add_development_dependency "rb-inotify"
25
25
  gem.add_development_dependency "compass"
26
+ gem.add_development_dependency "bourbon"
26
27
 
27
28
  gem.files = `git ls-files`.split($\)
28
29
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -0,0 +1,5 @@
1
+ require "sprockets"
2
+
3
+
4
+ bourbon_root = Gem::Specification.find_by_name("bourbon").gem_dir
5
+ Sprockets.append_path File.join(bourbon_root, "app", "assets", "stylesheets")
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module AssetsPlugin
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
@@ -0,0 +1,4 @@
1
+ @import "bourbon"
2
+
3
+ .photo
4
+ @include box-shadow(0 0 5px 0px hsla(0, 0%, 0%, 0.65))
@@ -1,4 +1,4 @@
1
- @import "compass/css3/box-shadow"
1
+ @import "compass"
2
2
 
3
3
  .photo
4
4
  @include single-box-shadow(#eee, 0px, 0px, 5px)
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+ require 'jekyll-assets/bourbon'
3
+
4
+
5
+ module Jekyll::AssetsPlugin
6
+ describe 'Bourbon integration' do
7
+ it "should globally append bourbon paths into Sprockets environment" do
8
+ asset = @site.assets['vendor/bourbon.css'].to_s
9
+
10
+ asset.should =~ /-webkit-box-shadow/
11
+ asset.should =~ /box-shadow/
12
+ end
13
+ end
14
+ end
@@ -5,7 +5,11 @@ require 'jekyll-assets/compass'
5
5
  module Jekyll::AssetsPlugin
6
6
  describe 'Compass integration' do
7
7
  it "should globally append compass paths into Sprockets environment" do
8
- puts @site.assets['photos.css'].to_s
8
+ asset = @site.assets['vendor/compass.css'].to_s
9
+
10
+ asset.should =~ /-webkit-box-shadow/
11
+ asset.should =~ /-moz-box-shadow/
12
+ asset.should =~ /box-shadow/
9
13
  end
10
14
  end
11
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-06 00:00:00.000000000 Z
12
+ date: 2013-01-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll
@@ -123,6 +123,22 @@ dependencies:
123
123
  - - ! '>='
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: bourbon
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
126
142
  description: ! " Jekyll plugin, that allows you to write javascript/css assets in\n
127
143
  \ other languages such as CoffeeScript, Sass, Less and ERB, concatenate\n them,
128
144
  respecting dependencies, minify and many more.\n"
@@ -137,11 +153,13 @@ files:
137
153
  - .travis.yml
138
154
  - Gemfile
139
155
  - Guardfile
156
+ - HISTORY.md
140
157
  - LICENSE
141
158
  - README.md
142
159
  - Rakefile
143
160
  - jekyll-assets.gemspec
144
161
  - lib/jekyll-assets.rb
162
+ - lib/jekyll-assets/bourbon.rb
145
163
  - lib/jekyll-assets/compass.rb
146
164
  - lib/jekyll/assets_plugin.rb
147
165
  - lib/jekyll/assets_plugin/asset_file.rb
@@ -153,14 +171,16 @@ files:
153
171
  - spec/fixtures/_assets/app.css.erb
154
172
  - spec/fixtures/_assets/app.js
155
173
  - spec/fixtures/_assets/noise.png
156
- - spec/fixtures/_assets/photos.css.sass
157
174
  - spec/fixtures/_assets/should_fail.css.erb
158
175
  - spec/fixtures/_assets/vapor.css
159
176
  - spec/fixtures/_assets/vapor.js
177
+ - spec/fixtures/_assets/vendor/bourbon.css.sass
178
+ - spec/fixtures/_assets/vendor/compass.css.sass
160
179
  - spec/fixtures/_config.yml
161
180
  - spec/fixtures/_layouts/default.html
162
181
  - spec/fixtures/_posts/2012-10-19-hello-world.md
163
182
  - spec/fixtures/index.html
183
+ - spec/lib/jekyll-assets/bourbon_spec.rb
164
184
  - spec/lib/jekyll-assets/compass_spec.rb
165
185
  - spec/lib/jekyll/assets_plugin/asset_file_spec.rb
166
186
  - spec/lib/jekyll/assets_plugin/configuration_spec.rb
@@ -191,20 +211,22 @@ rubyforge_project:
191
211
  rubygems_version: 1.8.23
192
212
  signing_key:
193
213
  specification_version: 3
194
- summary: jekyll-assets-0.2.2
214
+ summary: jekyll-assets-0.2.3
195
215
  test_files:
196
216
  - spec/fixtures/.gitignore
197
217
  - spec/fixtures/_assets/app.css.erb
198
218
  - spec/fixtures/_assets/app.js
199
219
  - spec/fixtures/_assets/noise.png
200
- - spec/fixtures/_assets/photos.css.sass
201
220
  - spec/fixtures/_assets/should_fail.css.erb
202
221
  - spec/fixtures/_assets/vapor.css
203
222
  - spec/fixtures/_assets/vapor.js
223
+ - spec/fixtures/_assets/vendor/bourbon.css.sass
224
+ - spec/fixtures/_assets/vendor/compass.css.sass
204
225
  - spec/fixtures/_config.yml
205
226
  - spec/fixtures/_layouts/default.html
206
227
  - spec/fixtures/_posts/2012-10-19-hello-world.md
207
228
  - spec/fixtures/index.html
229
+ - spec/lib/jekyll-assets/bourbon_spec.rb
208
230
  - spec/lib/jekyll-assets/compass_spec.rb
209
231
  - spec/lib/jekyll/assets_plugin/asset_file_spec.rb
210
232
  - spec/lib/jekyll/assets_plugin/configuration_spec.rb