jekyll-asset-pipeline 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -12,7 +12,10 @@
12
12
  - [Templates](#templates)
13
13
  - [Configuration](#configuration)
14
14
  - [Contribute](#contribute)
15
+ - [Community](#community)
16
+ - [Code Status](#code-status)
15
17
  - [Credits](#credits)
18
+ - [License](#license)
16
19
 
17
20
  ## Features
18
21
 
@@ -143,7 +146,7 @@ end
143
146
 
144
147
  ### Successive Preprocessing
145
148
 
146
- If you would like to run an asset through multiple preprocessors successively, you can do so by naming your assets with nested file extensions. Nest the extensions in the order (right to left) that the asset should be processed. For example, `.css.scss.erb` would first be processed by an "erb" preprocessor then by a "scss" preprocessor before being rendered. This convention is very similar to the convention used by the [Ruby on Rails asset pipeline](http://guides.rubyonrails.org/asset_pipeline.html#preprocessing).
149
+ If you would like to run an asset through multiple preprocessors successively, you can do so by naming your assets with nested file extensions. Nest the extensions in the order (right to left) that the asset should be processed. For example, `.css.scss.erb` would first be processed by an "erb" preprocessor then by a "scss" preprocessor before being rendered. This convention is very similar to the convention used by the [Ruby on Rails asset pipeline](http://guides.rubyonrails.org/asset_pipeline.html#preprocessing).
147
150
 
148
151
  > *Don't forget to define preprocessors for the extensions you use in your filenames, otherwise Jekyll Asset Pipeline will not process your asset.*
149
152
 
@@ -277,6 +280,10 @@ You can contribute to the Jekyll Asset Pipeline by submitting a pull request [vi
277
280
 
278
281
  Feel free to message me on [Twitter](http://twitter.com/matthodan) or [Facebook](http://facebook.com/matthodan).
279
282
 
283
+ ## Community
284
+
285
+ - Here is a list of [sites that use Jekyll Asset Pipeline](http://github.com/matthodan/jekyll-asset-pipeline/wiki/Sites-that-use-Jekyll-Asset-Pipeline). Feel free to add your site to the list if you want.
286
+
280
287
  ## Code Status
281
288
 
282
289
  - [![Build Status](https://secure.travis-ci.org/matthodan/jekyll-asset-pipeline.png)](https://travis-ci.org/matthodan/jekyll-asset-pipeline)
@@ -12,6 +12,8 @@ require 'liquid'
12
12
  # Jekyll extensions
13
13
  require 'jekyll_asset_pipeline/extensions/jekyll/static_file_extensions'
14
14
  require 'jekyll_asset_pipeline/extensions/jekyll/static_asset_file'
15
+ require 'jekyll_asset_pipeline/extensions/jekyll/site_extensions'
16
+ require 'jekyll_asset_pipeline/extensions/jekyll/site'
15
17
 
16
18
  # Liquid extensions
17
19
  require 'jekyll_asset_pipeline/extensions/liquid/liquid_block_extensions'
@@ -34,7 +36,7 @@ require 'jekyll_asset_pipeline/cache'
34
36
  require 'jekyll_asset_pipeline/pipeline'
35
37
 
36
38
  module JekyllAssetPipeline
37
- # Default configuration settings for Jekyll Asset Bundler
39
+ # Default configuration settings for Jekyll Asset Pipeline
38
40
  # Strings used for keys to play nice when merging with _config.yml
39
41
  DEFAULTS = {
40
42
  'output_path' => 'assets', # Destination for bundle file (within the '_site' directory)
@@ -1,17 +1,21 @@
1
1
  module JekyllAssetPipeline
2
2
  class Cache
3
- @@cache = {}
3
+ @cache = {}
4
4
 
5
5
  def self.add(key, value)
6
- @@cache[key] = value
6
+ @cache[key] = value
7
7
  end
8
8
 
9
9
  def self.has_key?(key)
10
- @@cache.has_key?(key)
10
+ @cache.has_key?(key)
11
11
  end
12
12
 
13
13
  def self.get(key)
14
- @@cache[key]
14
+ @cache[key]
15
+ end
16
+
17
+ def self.clear
18
+ @cache = {}
15
19
  end
16
20
  end
17
21
  end
@@ -0,0 +1,5 @@
1
+ module Jekyll
2
+ class Site
3
+ include JekyllAssetPipeline::JekyllSiteExtensions
4
+ end
5
+ end
@@ -0,0 +1,21 @@
1
+ module JekyllAssetPipeline
2
+ module JekyllSiteExtensions
3
+ def self.included(base)
4
+ base.class_eval do
5
+ # Store the original Jekyll::Site#cleanup method
6
+ old_cleanup_method = instance_method(:cleanup)
7
+
8
+ # Override Jekyll::Site#cleanup
9
+ define_method(:cleanup) do
10
+ # Run the Jekyll::Site#cleanup method
11
+ original_return_val = old_cleanup_method.bind(self).call()
12
+
13
+ # Clear Jekyll Asset Pipeline cache
14
+ JekyllAssetPipeline::Cache.clear
15
+
16
+ original_return_val
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -1,3 +1,3 @@
1
1
  module JekyllAssetPipeline
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-asset-pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
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: 2012-12-11 00:00:00.000000000 Z
12
+ date: 2012-12-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll
@@ -75,7 +75,7 @@ dependencies:
75
75
  - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
77
  version: '4.3'
78
- description: Adds asset preprocessing (CoffeeScript, Sass, Less, ERB, etc.), asset
78
+ description: Adds asset preprocessing (CoffeeScript, Sass, Less, ERB, etc.) and asset
79
79
  compression/minification/gzip (Yahoo YUI Compressor, Google Closure Compiler, etc.)
80
80
  to Jekyll.
81
81
  email: matthew.c.hodan@gmail.com
@@ -87,6 +87,8 @@ files:
87
87
  - lib/jekyll_asset_pipeline/cache.rb
88
88
  - lib/jekyll_asset_pipeline/compressor.rb
89
89
  - lib/jekyll_asset_pipeline/converter.rb
90
+ - lib/jekyll_asset_pipeline/extensions/jekyll/site.rb
91
+ - lib/jekyll_asset_pipeline/extensions/jekyll/site_extensions.rb
90
92
  - lib/jekyll_asset_pipeline/extensions/jekyll/static_asset_file.rb
91
93
  - lib/jekyll_asset_pipeline/extensions/jekyll/static_file_extensions.rb
92
94
  - lib/jekyll_asset_pipeline/extensions/liquid/asset_tag.rb