jekyll-assets 2.0.0.pre.beta1 → 2.0.0.pre.beta2

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: b9e0ba8666a5456c4cad0827a4d99fd850a68089
4
- data.tar.gz: b60f463be255a335521d03e7202087833198b83e
3
+ metadata.gz: 48edfcaf7a230379b1678a465004e4edf5381f3c
4
+ data.tar.gz: 0362698b9e266c37d035ecf3ac25ca4f4bc0e12d
5
5
  SHA512:
6
- metadata.gz: 3d2930e11fdb9669d239ed370ab22a5d04430961434cd29af23448e8643d839804e92dcb51c251a11478b3014468b2c3b964eef69f6b5c10ca572302614e55bc
7
- data.tar.gz: b52a71fe9a67787b55987d8879af857a2eb99e6f733d468af6450931fcdb7a7780f2259cec160f72955b9036eb777ae4635816e95b51d309967dcffe65053ba0
6
+ metadata.gz: 24ba84fa3da852fe6dac197bbca6fddb81b9a5fd3537e107801263b48a91cece82500aa1a542f45be1cd44301b9f715dbfe5745a8a8fde3272704b14874bec9e
7
+ data.tar.gz: 256d59c5e6d68739be12120cfb10a4438ca9529a58178bdf20f6dce1515f1e0547bdf7a8052724e27b40854dc85ff440d5950034293951d86401645c4d562c5e
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://travis-ci.org/jekyll-assets/jekyll-assets.png?branch=master)](https://travis-ci.org/jekyll-assets/jekyll-assets) [![Coverage Status](https://coveralls.io/repos/jekyll-assets/jekyll-assets/badge.png?branch=master)](https://coveralls.io/r/jekyll-assets/jekyll-assets) [![Code Climate](https://codeclimate.com/github/jekyll-assets/jekyll-assets/badges/gpa.svg)](https://codeclimate.com/github/jekyll-assets/jekyll-assets) [![Dependency Status](https://gemnasium.com/jekyll-assets/jekyll-assets.svg)](https://gemnasium.com/jekyll-assets/jekyll-assets)
1
+ [![Build Status](https://travis-ci.org/jekyll/jekyll-assets.png?branch=master)](https://travis-ci.org/jekyll/jekyll-assets) [![Coverage Status](https://coveralls.io/repos/jekyll/jekyll-assets/badge.png?branch=master)](https://coveralls.io/r/jekyll/jekyll-assets) [![Code Climate](https://codeclimate.com/github/jekyll/jekyll-assets/badges/gpa.svg)](https://codeclimate.com/github/jekyll/jekyll-assets) [![Dependency Status](https://gemnasium.com/jekyll/jekyll-assets.svg)](https://gemnasium.com/jekyll/jekyll-assets)
2
2
 
3
3
 
4
4
  ## Are you looking for the docs for Jekyll Assets < 2.0.0?
@@ -11,10 +11,26 @@ Jekyll 3 assets is an asset pipeline using Sprockets 3 to build especially
11
11
  for Jekyll 3. It utilizes new features of both Sprockets and Jekyll to achieve
12
12
  a clean and extensible assets platform for Jekyll.
13
13
 
14
+ ## Using Jekyll Assets with Jekyll
15
+
16
+ When you are using a Gemfile and bundler you need to do nothing special to get
17
+ Jekyll Assets to work, it will automatically load itself and work with Jekyll
18
+ when you bundle install and run Jekyll through bundle exec. However, when you
19
+ have globally installed Gems (`gem install jekyll-assets`) then in your
20
+ `_config.yml` do:
21
+
22
+ ```yaml
23
+ gems:
24
+ - jekyll-assets
25
+ ```
26
+
14
27
  ## Configuration
15
28
 
16
29
  ```yaml
17
30
  assets:
31
+ compress:
32
+ css: false | true | default - development: false, production: true
33
+ js: false | true | default - development: false, production: true
18
34
  cache: false | directory | default: .asset-cache
19
35
  cdn: https://cdn.example.com
20
36
  skip_prefix_with_cdn: false
@@ -32,6 +48,12 @@ assets:
32
48
  * Disable digesting by default in development.
33
49
  * Digest by default in production
34
50
 
51
+ ## Asset Compression
52
+
53
+ * Requires sass and uglify.
54
+ * Disable compression by default in development.
55
+ * Enable by default in production.
56
+
35
57
  ***You can force digesting with `digest: true` in your `_config.yml`***
36
58
 
37
59
  ## ERB Support
@@ -42,9 +64,10 @@ would allow you to use Ruby in ways they don't want you to.
42
64
 
43
65
  ## Tags
44
66
 
45
- * stylesheet, css, style
46
- * javascript, js
47
67
  * image, img
68
+ * javascript, js
69
+ * stylesheet, css, style
70
+ * asset, asset_source
48
71
  * asset_path
49
72
 
50
73
  ### Tag Example:
@@ -0,0 +1 @@
1
+ require "jekyll/assets"
@@ -65,12 +65,14 @@ module Jekyll
65
65
  def process_tag(sprockets, asset)
66
66
  set_img_alt asset if @tag == "img"
67
67
  out = get_path sprockets, asset
68
-
69
68
  sprockets.used.add(asset)
70
69
 
71
70
  if @tag == "asset_path"
72
71
  return out
73
72
 
73
+ elsif @tag == "asset" || @tag == "asset_source"
74
+ return asset.to_s
75
+
74
76
  elsif @args[:data][:uri]
75
77
  return TAGS[@tag] % [
76
78
  asset.data_uri, @args.to_html
@@ -141,6 +143,6 @@ module Jekyll
141
143
  end
142
144
  end
143
145
 
144
- %W(js css img image javascript stylesheet style asset_path).each do |t|
146
+ %W(js css img image javascript stylesheet style asset_path asset_source asset).each do |t|
145
147
  Liquid::Template.register_tag t, Jekyll::Assets::Tag
146
148
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Assets
3
- VERSION="2.0.0.pre.beta1"
3
+ VERSION="2.0.0.pre.beta2"
4
4
  end
5
5
  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: 2.0.0.pre.beta1
4
+ version: 2.0.0.pre.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordon Bedwell
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-10-09 00:00:00.000000000 Z
13
+ date: 2015-10-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sprockets
@@ -126,6 +126,7 @@ files:
126
126
  - LICENSE
127
127
  - README.md
128
128
  - Rakefile
129
+ - lib/jekyll-assets.rb
129
130
  - lib/jekyll/assets.rb
130
131
  - lib/jekyll/assets/cached.rb
131
132
  - lib/jekyll/assets/configuration.rb