jekyll-assets 0.10.1 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ffaf188e4bc35cd2ba432d73e96d25586c655070
4
- data.tar.gz: bbf744bd06c57413e959396644ad61bff01f7683
3
+ metadata.gz: 125f0a58023e5e41de8eb1fbfb21d52d81cc43ec
4
+ data.tar.gz: 9214d2bf1839b62ea94ec23c3803ab768b019304
5
5
  SHA512:
6
- metadata.gz: 8ea009a04a48763d160daf5f1f592ef3e497214f1387017b887e712db3bcbe82a2b5e1b663b8a4e6bfb74a882e56f406b93668fe7afa9a62142ce513bec7c53e
7
- data.tar.gz: 704ca0157f9120f200f972375f104a65137c6673de3f22f866f7f975790677a27a9dc52b4e6be3a0d53a233452ae91b3e8c05c054b03708aa5d60c05833dd83b
6
+ metadata.gz: 6d5c1ab77cc292c5630a0cc3e0d518451c5da307ea4ddb83905bdae472d43585caaf3b5f01d6c5f60e363d585490e2ff2b676122b47ce750eb04979cbae1d833
7
+ data.tar.gz: a6648f8282532c1ab4b64ef7be5809ac89dad5558cb1826ba8260011b14232c28b97a73bda4d052204f6d831c267351183d6dd91da1da22425b5819a2f838504
data/README.md CHANGED
@@ -24,12 +24,14 @@ Jekyll plugin, that adds Rails-alike assets pipeline, that means that:
24
24
  details.
25
25
  - [Compass][compass], [Bourbon][bourbon] and [Neat][neat] built-in support.
26
26
  See "Custom Vendors" below.
27
+ - [Rails Assets][rails_assets] support
27
28
  - [Autoprefixer][autoprefixer] support
28
29
 
29
30
  [compass]: http://compass-style.org/
30
31
  [bourbon]: http://bourbon.io/
31
32
  [neat]: http://neat.bourbon.io/
32
33
  [autoprefixer]: https://github.com/postcss/autoprefixer
34
+ [rails_assets]: https://rails-assets.org/
33
35
 
34
36
  Jekyll-Assets uses fabulous [Sprockets][sprockets] under the hood, so you may
35
37
  refer to Rails guide about [Asset Pipeline][rails-guide] for detailed
@@ -83,6 +85,26 @@ Once plugin installed, you'll have following Liquid tags available:
83
85
  - `{% asset_path logo.png %}`: Returns _resulting_ URL for `logo.png`
84
86
  - `{% asset app.css %}`: Returns _compiled_ body of `app.css`
85
87
 
88
+ You can pass extra attributes to `javascript`, `stylesheet` and `image` tags:
89
+
90
+ ``` html
91
+ {% image logo.png alt="Logo" %}
92
+ {% javascript app async %}
93
+ {% stylesheet app actually="anything" you might='want' %}
94
+
95
+ <!-- renders to something like this (linebreaks in tags for readability here) -->
96
+
97
+ <img src="/assets/logo-68b329da9893e34099c7d8ad5cb9c940.png" alt="Logo">
98
+ <script src="/assets/app-6b95b1b3231c52113ca34ae9d1b5dabf.js" async></script>
99
+ <link rel="stylesheet" href="/assets/app-349212fba570137adfec745e37b6d7fb.css"
100
+ actually="anything" you might='want'>
101
+
102
+ <!-- NOTICE !!! if your asset file contains spaces, surround it's name with quotes -->
103
+
104
+ {% asset_path "my logo.png" %}
105
+ {% asset_path 'my logo.png' %}
106
+ ```
107
+
86
108
  Also you'll have complimentary Liquid filters as well:
87
109
 
88
110
  - `{{ 'app' | javascript }}`: Generates `<script>` tag for `app.js`
@@ -309,6 +331,10 @@ Require `jekyll-assets/bootstrap` to enable, e.g.:
309
331
 
310
332
  ``` ruby
311
333
  require "jekyll-assets"
334
+
335
+ # bootstrap requires minimum precision of 10, see https://github.com/twbs/bootstrap-sass/issues/409
336
+ ::Sass::Script::Number.precision = [10, ::Sass::Script::Number.precision].max
337
+
312
338
  require "jekyll-assets/bootstrap"
313
339
  ```
314
340
 
@@ -351,6 +377,33 @@ require "jekyll-assets/neat"
351
377
  Now you can add `@import "neat"` in your SASS assets to get Neat goodies.
352
378
 
353
379
 
380
+ ### Rails Assets Support
381
+
382
+ [Rails Assets][rails_assets] allows you to easily install Bower dependencies via Bundler.
383
+
384
+ Install your Bower dependencies in the `rails_assets` group in your `Gemfile`:
385
+
386
+ ``` ruby
387
+ group :rails_assets do
388
+ gem "rails-assets-jquery"
389
+ gem "rails-assets-angular"
390
+ end
391
+ ```
392
+
393
+ Require `jekyll-assets/rails-assets` to enable, e.g.:
394
+
395
+ ``` ruby
396
+ require "jekyll-assets"
397
+ require "jekyll-assets/rails-assets"
398
+ ```
399
+
400
+ Now you can `require` these dependencies in your assets, e.g. `site.js`:
401
+
402
+ ``` javascript
403
+ //= require jquery
404
+ //= require angular
405
+ ```
406
+
354
407
  ## Autoprefixer
355
408
 
356
409
  To enable Autoprefixer, add `autoprefixer-rails` to your `Gemfile`:
@@ -0,0 +1,8 @@
1
+ # rubocop: disable Style/FileName
2
+ Bundler.require(:rails_assets)
3
+
4
+ if defined? RailsAssets
5
+ RailsAssets.components.flat_map(&:load_paths).each do |path|
6
+ Sprockets.append_path(path)
7
+ end
8
+ end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module AssetsPlugin
3
- VERSION = "0.10.1"
3
+ VERSION = "0.11.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksey V Zapparov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-13 00:00:00.000000000 Z
11
+ date: 2014-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -123,6 +123,7 @@ files:
123
123
  - lib/jekyll-assets/compass.rb
124
124
  - lib/jekyll-assets/font-awesome.rb
125
125
  - lib/jekyll-assets/neat.rb
126
+ - lib/jekyll-assets/rails-assets.rb
126
127
  - lib/jekyll/assets_plugin.rb
127
128
  - lib/jekyll/assets_plugin/asset_path.rb
128
129
  - lib/jekyll/assets_plugin/configuration.rb
@@ -200,7 +201,7 @@ rubyforge_project:
200
201
  rubygems_version: 2.4.1
201
202
  signing_key:
202
203
  specification_version: 4
203
- summary: jekyll-assets-0.10.1
204
+ summary: jekyll-assets-0.11.0
204
205
  test_files:
205
206
  - spec/fixtures/.gitignore
206
207
  - spec/fixtures/_assets/alert.js
@@ -241,3 +242,4 @@ test_files:
241
242
  - spec/lib/jekyll/assets_plugin/tag_spec.rb
242
243
  - spec/spec_helper.rb
243
244
  - spec/support/fixtures_helpers.rb
245
+ has_rdoc: