jekyll-asset-pipeline 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,219 +1,246 @@
1
1
  # Jekyll Asset Pipeline
2
2
 
3
- [Jekyll Asset Pipeline](http://www.matthodan.com/2012/11/22/jekyll-asset-pipeline.html) is a powerful asset pipeline for Jekyll. It collects, converts and minifies JavaScript and CSS assets. Here are a sample of its features:
3
+ [Jekyll Asset Pipeline](http://www.matthodan.com/2012/11/22/jekyll-asset-pipeline.html) is a powerful asset pipeline that automatically collects, converts and compresses your site's JavaScript and CSS assets when you compile your Jekyll site. Here are some of its features:
4
4
 
5
- - Declaritive dependency management
6
- - Asset preprocessing and compression
7
- - MD5 fingerprinting for browser caching
8
- - Development mode (i.e. no asset compression)
9
- - Works with Jekyll's auto site regeneration
10
-
11
- Jekyll Asset Pipeline adds the ability to write assets in languages such as [CoffeeScript](http://coffeescript.org/), [Sass](http://sass-lang.com/), or any other language you like via [asset converter extensions](#asset-preprocessing). It also adds the ability to minify assets with Yahoo's [YUI Compressor](http://developer.yahoo.com/yui/compressor/), Google's [Closure Compilier](https://developers.google.com/closure/compiler/), or any other compression library via [asset compressor extensions](#asset-compression).
5
+ - Declarative dependency management via asset manifests
6
+ - Asset preprocessing/conversion (supports [CoffeeScript](http://coffeescript.org/), [Sass/Scss](http://sass-lang.com/), [Less](http://lesscss.org/), [Erb](http://ruby-doc.org/stdlib-1.9.3/libdoc/erb/rdoc/ERB.html), etc.)
7
+ - Asset compression (supports [YUI Compressor](http://developer.yahoo.com/yui/compressor/), [Closure Compiler](https://developers.google.com/closure/compiler/), etc.)
8
+ - Fingerprints bundled asset filenames with MD5 hashes for better browser caching
9
+ - Automatic generation of HTML "link" and "script" tags that point to bundled assets
10
+ - Integrates seamlessly into Jekyll's workflow, including auto site regeneration
12
11
 
13
12
  ## Table of Contents
14
13
 
14
+ - [How It Works](#how-it-works)
15
15
  - [Getting Started](#getting-started)
16
- - [Asset Compression](#asset-compression)
17
16
  - [Asset Preprocessing](#asset-preprocessing)
17
+ - [Asset Compression](#asset-compression)
18
18
  - [Templates](#templates)
19
19
  - [Configuration](#configuration)
20
20
  - [Contribute](#contribute)
21
21
  - [Credits](#credits)
22
22
 
23
- ## Getting Started
23
+ ## How It Works
24
24
 
25
- Jekyll Asset Pipeline is extremely easy to add to your Jekyll project and has no incremental dependacies beyond those already required by Jekyll. Once you have a basic Jekyll site up and running, simply follow the following steps to install and configure Jekyll Asset Pipeline.
25
+ Jekyll Asset Pipeline's workflow can be summarized as follows:
26
26
 
27
- Install the "jekyll-asset-pipeline" gem via [Rubygems](http://rubygems.org/).
27
+ 1. Review site markup for instances of the `css_asset_tag` and `javascript_asset_tag` Liquid tags. Each occurrence of either of these tags identifies when a new bundle needs to be created and outlines (via a manifest) which assets to include in the bundle.
28
+ 2. Collect raw assets based on the manifest and run them through converters/preprocessors (if necessary) to convert them into valid CSS or JavaScript.
29
+ 3. Combine the processed assets into a single bundle, compress the bundled assets (if desired), and save the compressed bundle to the "_site" output folder.
30
+ 4. Replace `css_asset_tag` and `javascript_asset_tag` Liquid tags with HTML "link" and "script" tags, respectively, that link to finished bundles.
28
31
 
29
- ``` bash
30
- gem install jekyll-asset-pipeline
31
- ```
32
+ ## Getting Started
32
33
 
33
- > *If you are using [Bundler](http://gembundler.com/) to manage your project's gems, you can just add "jekyll-asset-pipeline" to your Gemfile and run `bundle install`.*
34
+ Jekyll Asset Pipeline is extremely easy to add to your Jekyll project and has no incremental dependancies beyond those required by Jekyll. Once you have a basic Jekyll site up and running, follow the steps below to install and configure Jekyll Asset Pipeline.
34
35
 
35
- Add a "_plugins" folder to your project (if you do not already have one). Within the "_plugins" folder, add a file named "jekyll_asset_pipeline.rb" with the following code.
36
+ 1. Install the "jekyll-asset-pipeline" gem via [Rubygems](http://rubygems.org/).
36
37
 
37
- ``` ruby
38
- require 'jekyll_asset_pipeline'
39
- ```
38
+ ``` bash
39
+ gem install jekyll-asset-pipeline
40
+ ```
40
41
 
41
- Add a "_assets" folder to your project and copy your JavaScript and CSS assets into the folder. We want Jekyll to ignore these files since we will be including these files via a bundle that is generated by Jekyll Asset Pipeline.
42
+ > *If you are using [Bundler](http://gembundler.com/) to manage your project's gems, you can just add "jekyll-asset-pipeline" to your Gemfile and run `bundle install`.*
42
43
 
43
- In the HTML "head" section of your default layout (or other HTML page) of your Jekyll site, add one or both of the following [Liquid](http://liquidmarkup.org/) blocks and replace "foo" and "bar" with your asset files. These blocks will be converted into HTML "link" and "script" tags that point to the bundled asset files. The manifest must be a properly formatted YAML array and must include paths to your raw assets from the root folder of your project.
44
+ 2. Add a "\_plugins" folder to your project if you do not already have one. Within the "\_plugins" folder, add a file named "jekyll\_asset\_pipeline.rb" with the following require statement as its contents.
44
45
 
45
- ``` html
46
- {% css_asset_tag global %}
47
- - /_assets/foo.css
48
- - /_assets/bar.css
49
- {% endcss_asset_tag %}
46
+ ``` ruby
47
+ require 'jekyll_asset_pipeline'
48
+ ```
50
49
 
51
- {% javascript_asset_tag global %}
52
- - /_assets/foo.js
53
- - /_assets/bar.js
54
- {% endjavascript_asset_tag %}
55
- ```
50
+ 3. Move your assets into a Jekyll ignored folder (i.e. a folder that begins with an underscore "\_") so that Jekyll won't include these raw assets in the site output. I recommend using an "\_assets" folder to hold your site's assets.
56
51
 
57
- > *The above example will create two bundles, a CSS bundle named "global-md5hash.css" and a JavaScript bundle named "global-md5hash.js" that include their respective assets per the manifest.*
52
+ 4. Add the following [Liquid](http://liquidmarkup.org/) blocks to your site's HTML "head" section. These blocks will be converted into HTML "link" and "script" tags that point to bundled assets. Within each block is a manifest of assets to include in the bundle. Assets are included in the same order that they are listed in the manifest. Replace the "foo" and "bar" assets with your site's assets. Name the bundle by including a string after the opening tag. We've named our bundles "global" in the below example.
58
53
 
59
- Run the `jekyll` command so that Jekyll compiles your site. You should see an output that includes the following Jekyll Asset Pipeline status messages.
54
+ ``` html
55
+ {% css_asset_tag global %}
56
+ - /_assets/foo.css
57
+ - /_assets/bar.css
58
+ {% endcss_asset_tag %}
60
59
 
61
- ``` bash
62
- Asset Pipeline: Compiling bundle... compiled 'global-md5hash.css'.
63
- Asset Pipeline: Compiling bundle... compiled 'global-md5hash.js'.
64
- ```
60
+ {% javascript_asset_tag global %}
61
+ - /_assets/foo.js
62
+ - /_assets/bar.js
63
+ {% endjavascript_asset_tag %}
64
+ ```
65
+ > *Asset manifests must be formatted as YAML arrays and include full paths to each asset from the root of the project.*
65
66
 
66
- > *If you do not see these messages, check that you have __not__ set Jekyll's "safe" option to "true" via a "_config.yml" file. If the "safe" option is set to "true", Jekyll will not run third-party plugins.*
67
+ 5. Run the `jekyll` command to compile your site. You should see an output that includes the following Jekyll Asset Pipeline status messages.
67
68
 
68
- That's it! You now have an asset pipeline. Look in the "_site" folder of your project and you should see an "assets" folder that contains the bundled assets. You should also see tags that point to these assets in your HTML markup where you included the Liquid blocks.
69
+ ``` bash
70
+ Asset Pipeline: Compiling bundle... compiled 'global-md5hash.css'.
71
+ Asset Pipeline: Compiling bundle... compiled 'global-md5hash.js'.
72
+ ```
69
73
 
70
- ## Asset Compression
74
+ > *If you do not see these messages, check that you have __not__ set Jekyll's "safe" option to "true" in your site's "_config.yml". If the "safe" option is set to "true", Jekyll will not run plugins.*
71
75
 
72
- Adding compression with your favorite minification library is trivial with Jekyll Asset Pipeline. In the following example, we will add a custom compressor extension that uses Yahoo's YUI Compressor to compress our CSS and JavaScript assets.
76
+ That is it! You should now have bundled assets. Look in the "_site" folder of your project for an "assets" folder that contains the bundled assets. HTML tags that point to these assets have been placed in the HTML output where you included the Liquid blocks. *You may notice that your assets have not been converted or compressed-- we will add that functionality next.*
73
77
 
74
- In the "jekyll_asset_pipeline.rb" file that we created in the "Getting Started" section of this post, add the following code to the end of the file (i.e. after the "require" statement we added previously).
78
+ ## Asset Preprocessing
75
79
 
76
- ``` ruby
77
- module JekyllAssetPipeline
78
- class CssCompressor < JekyllAssetPipeline::Compressor
79
- require 'yui/compressor'
80
+ Asset preprocessing (i.e. conversion) allows us to write our assets in languages such as [CoffeeScript](http://coffeescript.org/), [Sass](http://sass-lang.com/), [Less](http://lesscss.org/), [Erb](http://ruby-doc.org/stdlib-1.9.3/libdoc/erb/rdoc/ERB.html) or any other language. One of Jekyll Asset Pipeline's key strengths is that it works with __any__ preprocessing library that has a ruby wrapper. Adding a preprocessor is straightforward, but requires a small amount of additional code.
80
81
 
81
- def self.filetype
82
- '.css'
83
- end
82
+ In the following example, we will add a preprocessor that converts CoffeeScript into JavaScript.
84
83
 
85
- def compress
86
- return YUI::CssCompressor.new.compress(@content)
87
- end
88
- end
89
-
90
- class JavaScriptCompressor < JekyllAssetPipeline::Compressor
91
- require 'yui/compressor'
92
-
93
- def self.filetype
94
- '.js'
95
- end
84
+ ### CoffeeScript
96
85
 
97
- def compress
98
- return YUI::JavaScriptCompressor.new(munge: true).compress(@content)
99
- end
86
+ 1. In the "jekyll\_asset\_pipeline.rb" file that we created in the "Getting Started" section, add the following code to the end of the file (i.e. after the "require" statement).
87
+
88
+ ``` ruby
89
+ module JekyllAssetPipeline
90
+ class CoffeeScriptConverter < JekyllAssetPipeline::Converter
91
+ require 'coffee-script'
92
+
93
+ def self.filetype
94
+ '.coffee'
95
+ end
96
+
97
+ def convert
98
+ return CoffeeScript.compile(@content)
99
+ end
100
+ end
100
101
  end
101
- end
102
- ```
102
+ ```
103
103
 
104
- The above code adds a CSS and a JavaScript compressor. You can name the class of a compressor anything as long as it inherits from "JekyllAssetPipeline::Compressor".
104
+ > The above code adds a CoffeeScript converter. You can name a converter anything as long as it inherits from "JekyllAssetPipeline::Converter". The "self.filetype" method defines the type of asset a converter will process (e.g. ".coffee" for CoffeeScript) based on the extension of the raw asset file. A "@content" instance variable that contains the raw content of our asset is made available within the converter. The converter should process this content and return the processed content (as a string) via a "convert" method.
105
105
 
106
- The "self.filetype" method defines the type of asset a compressor will process (either '.js' or '.css'). The "compress" method is where the magic happens. A "@content" instance variable that contains the raw content of our bundle is made available within the compressor. The compressor should process this content and return the processed content (as a string) via a "compress" method.
106
+ 2. If you haven't already, you should now install any dependancies that are required by your converter. In our case, we need to install the "coffee-script" gem.
107
107
 
108
- If you haven't already, you should now install any dependencies that are required by your compressor. In our case, we need to install the "yui-compressor" gem.
108
+ ``` bash
109
+ gem install coffee-script
110
+ ```
109
111
 
110
- ``` ruby
111
- gem install yui-compressor
112
- ```
113
-
114
- > *If you are using [Bundler](http://gembundler.com/) to manage your project's gems, you can just add "yui-compressor" to your Gemfile and run `bundle install`.*
115
-
116
- Run the `jekyll` command so that Jekyll compiles your site.
117
-
118
- That's it! Your asset pipeline should have compressed your CSS and JavaScript assets. You can verify that this is the case by looking at the contents of the bundles generated in the "_site/assets" folder of your project.
112
+ > *If you are using [Bundler](http://gembundler.com/) to manage your project's gems, you can just add "coffee-script" to your Gemfile and run `bundle install`.*
119
113
 
120
- ## Asset Preprocessing
114
+ 3. Run the `jekyll` command to compile your site.
121
115
 
122
- Asset preprocessing (i.e. conversion) allows us to write our assets in languages such as [CoffeeScript](http://coffeescript.org/), [Sass](http://sass-lang.com/), or any other language we like. Adding asset preprocessing is trivial with Jekyll Asset Pipeline. In the following example, we will add a custom converter extension that converts CoffeeScript into JavaScript.
116
+ That is it! Your asset pipeline has converted any CoffeeScript assets into JavaScript before adding them to a bundle.
123
117
 
124
- ### CoffeeScript
118
+ ### SASS/SCSS
125
119
 
126
- In the "jekyll_asset_pipeline.rb" file that we created in the "Getting Started" section of this post, add the following code to the end of the file (i.e. after the "require" statement we added previously).
120
+ You probably get the gist of how converters work, but I thought I'd add an example of a SASS converter for quick reference.
127
121
 
128
122
  ``` ruby
129
123
  module JekyllAssetPipeline
130
- class CoffeeScriptConverter < JekyllAssetPipeline::Converter
131
- require 'coffee-script'
124
+ class SassConverter < JekyllAssetPipeline::Converter
125
+ require 'sass'
132
126
 
133
127
  def self.filetype
134
- '.coffee'
128
+ '.scss'
135
129
  end
136
130
 
137
131
  def convert
138
- return CoffeeScript.compile(@content)
132
+ return Sass::Engine.new(@content, syntax: :scss).render
139
133
  end
140
134
  end
141
135
  end
142
136
  ```
143
137
 
144
- > *If you already added a compressor, you can include your converter class alongside your compressor within the same JekyllAssetPipeline module.*
138
+ > *Don't forget to install the "sass" gem before you run the `jekyll` command since the above SASS converter requires the "sass" library as a dependency.*
145
139
 
146
- The above code adds a CoffeeScript converter. You can name the class of a converter anything as long as it inherits from "JekyllAssetPipeline::Converter".
140
+ ## Asset Compression
147
141
 
148
- The "self.filetype" method defines the type of asset a converter will process (e.g. ".coffee" for CoffeeScript) based on the extension of the raw asset file. The "convert" method is where the magic happens. A "@content" instance variable that contains the raw content of our asset is made available within the converter. The converter should process this content and return the processed content (as a string) via a "convert" method.
142
+ Asset compression allows us to decrease the size of our assets and increase the speed of our site. One of Jekyll Asset Pipeline's key strengths is that it works with __any__ compression library that has a ruby wrapper. Adding asset compression is straightforward, but requires a small amount of additional code.
149
143
 
150
- If you haven't already, you should now install any dependancies that are required by your converter. In our case, we need to install the "coffee-script" gem.
144
+ In the following example, we will add a compressor that uses Yahoo's YUI Compressor to compress our CSS and JavaScript assets.
151
145
 
152
- ``` bash
153
- gem install coffee-script
154
- ```
146
+ ### Yahoo's YUI Compressor
155
147
 
156
- > *If you are using [Bundler](http://gembundler.com/) to manage your project's gems, you can just add "coffee-script" to your Gemfile and run `bundle install`.*
148
+ 1. In the "jekyll\_asset\_pipeline.rb" file that we created in the "Getting Started" section, add the following code to the end of the file (i.e. after the "require" statement).
157
149
 
158
- Run the `jekyll` command so that Jekyll compiles your site.
150
+ ``` ruby
151
+ module JekyllAssetPipeline
152
+ class CssCompressor < JekyllAssetPipeline::Compressor
153
+ require 'yui/compressor'
159
154
 
160
- That's it! Your asset pipeline should have converted any CoffeeScript assets into JavaScript and included them in their respective bundle. You may need to disable compression (if you added a compressor) to be able to clearly view the result.
155
+ def self.filetype
156
+ '.css'
157
+ end
161
158
 
162
- ### SASS
159
+ def compress
160
+ return YUI::CssCompressor.new.compress(@content)
161
+ end
162
+ end
163
163
 
164
- You probably get the gist of how converters work, but I thought I'd add an example showing how to add a SASS converter as well.
164
+ class JavaScriptCompressor < JekyllAssetPipeline::Compressor
165
+ require 'yui/compressor'
165
166
 
166
- ``` ruby
167
- module JekyllAssetPipeline
168
- class SassConverter < JekyllAssetPipeline::Converter
169
- require 'sass'
167
+ def self.filetype
168
+ '.js'
169
+ end
170
170
 
171
- def self.filetype
172
- '.scss'
171
+ def compress
172
+ return YUI::JavaScriptCompressor.new(munge: true).compress(@content)
173
+ end
174
+ end
173
175
  end
176
+ ```
174
177
 
175
- def convert
176
- return Sass::Engine.new(@content, syntax: :scss).render
177
- end
178
+ > The above code adds a CSS and a JavaScript compressor. You can name a compressor anything as long as it inherits from "JekyllAssetPipeline::Compressor". The "self.filetype" method defines the type of asset a compressor will process (either '.js' or '.css'). The "compress" method is where the magic happens. A "@content" instance variable that contains the raw content of our bundle is made available within the compressor. The compressor should process this content and return the processed content (as a string) via a "compress" method.
179
+
180
+ 2. If you haven't already, you should now install any dependencies that are required by your compressor. In our case, we need to install the "yui-compressor" gem.
181
+
182
+ ``` ruby
183
+ gem install yui-compressor
184
+ ```
185
+
186
+ > *If you are using [Bundler](http://gembundler.com/) to manage your project's gems, you can just add "yui-compressor" to your Gemfile and run `bundle install`.*
187
+
188
+ 3. Run the `jekyll` command to compile your site.
189
+
190
+ That is it! Your asset pipeline has compressed your CSS and JavaScript assets. You can verify that this is the case by looking at the contents of the bundles generated in the "\_site/assets" folder of your project.
191
+
192
+ ### Google's Closure Compiler
193
+
194
+ You probably get the gist of how compressors work, but I thought I'd add an example of a Google Closure Compiler compressor for quick reference.
195
+
196
+ ``` ruby
197
+ class JavaScriptCompressor < JekyllAssetPipeline::Compressor
198
+ require 'closure-compiler'
199
+
200
+ def self.filetype
201
+ '.js'
202
+ end
203
+
204
+ def compress
205
+ return Closure::Compiler.new.compile(@content)
178
206
  end
179
207
  end
180
208
  ```
181
-
182
- > *Don't forget to install the "sass" gem before you run the `jekyll` command since our SASS converter requires this library as a dependency.*
209
+ > *Don't forget to install the "closure-compiler" gem before you run the `jekyll` command since the above compressor requires the "closure-compiler" library as a dependency.*
183
210
 
184
211
  ## Templates
185
212
 
186
- When Jekyll Asset Pipeline creates a bundle, it returns an HTML tag that points to the bundled file. This tag is either a "link" tag for CSS or a "script" tag for JavaScript. Under most circumstances the default tags will suffice, but you may want to customize this output for special cases (e.g. if you want to use CSS media types).
213
+ When Jekyll Asset Pipeline creates a bundle, it returns an HTML tag that points to the bundle. This tag is either a "link" tag for CSS or a "script" tag for JavaScript. Under most circumstances the default tags will suffice, but you may want to customize this output for special cases (e.g. if you want to add a CSS media attribute).
187
214
 
188
215
  In the following example, we will override the default CSS link tag by adding a custom template that produces a link tag with a "media" attribute.
189
216
 
190
- In the "jekyll_asset_pipeline.rb" file that we created in the "Getting Started" section of this post, add the following code to the end of the file (i.e. after the "require" statement we added previously).
217
+ 1. In the "jekyll\_asset\_pipeline.rb" file that we created in the "Getting Started" section, add the following code.
191
218
 
192
- ``` ruby
193
- module JekyllAssetPipeline
194
- class CssTagTemplate < JekyllAssetPipeline::Template
195
- def self.filetype
196
- '.css'
197
- end
219
+ ``` ruby
220
+ module JekyllAssetPipeline
221
+ class CssTagTemplate < JekyllAssetPipeline::Template
222
+ def self.filetype
223
+ '.css'
224
+ end
198
225
 
199
- def html
200
- "<link href='/#{@path}/#{@filename}' rel='stylesheet' type='text/css' media='screen' />\n"
226
+ def html
227
+ "<link href='/#{@path}/#{@filename}' rel='stylesheet' type='text/css' media='screen' />\n"
228
+ end
201
229
  end
202
230
  end
203
- end
204
- ```
231
+ ```
205
232
 
206
- > *If you already added a compressor and/or a converter, you can include your template class alongside your compressor and/or converter within the same JekyllAssetPipeline module.*
233
+ > *If you already added a compressor and/or a converter, you can include your template class alongside your compressor and/or converter within the same JekyllAssetPipeline module.*
207
234
 
208
- The “self.filetype” method defines the type of bundle a template will target (either ".js" or ".css"). The “html” method is where the magic happens. “@path” and "@filename" instance variables are available within the class and contain the path and filename of the generated bundle, respectively. The template should return a string that contains an HTML tag pointing to the generated bundle via an "html" method.
235
+ > The “self.filetype” method defines the type of bundle a template will target (either ".js" or ".css"). The “html” method is where the magic happens. “@path” and "@filename" instance variables are available within the class and contain the path and filename of the generated bundle, respectively. The template should return a string that contains an HTML tag pointing to the generated bundle via an "html" method.
209
236
 
210
- Run the `jekyll` command so that Jekyll compiles your site.
237
+ 2. Run the `jekyll` command to compile your site.
211
238
 
212
- That’s it! Your asset pipeline should now use your template to generate a HTML "link" tag that includes a media attribute with the value "screen". You can verify this is the case by viewing the generated source within your project's "_site" folder.
239
+ That is it! Your asset pipeline used your template to generate an HTML "link" tag that includes a media attribute with the value "screen". You can verify that this is the case by viewing the generated source within your project's "\_site" folder.
213
240
 
214
241
  ## Configuration
215
242
 
216
- Jekyll Asset Pipeline provides the following two configuration options that can be controled by adding the following to the end of your project's "_config.yml" file.
243
+ Jekyll Asset Pipeline provides the following two configuration options that can be controlled by adding the following to the end of your project's "\_config.yml" file.
217
244
 
218
245
  ``` yaml
219
246
  asset_pipeline:
@@ -221,9 +248,9 @@ asset_pipeline:
221
248
  output_path: assets # Default = assets
222
249
  ```
223
250
 
224
- > *If you don't have a "_config.yml" file, consider reading the [configuration section](https://github.com/mojombo/jekyll/wiki/Configuration) of the Jekyll documentation.*
251
+ > *If you don't have a "\_config.yml" file, consider reading the [configuration section](https://github.com/mojombo/jekyll/wiki/Configuration) of the Jekyll documentation.*
225
252
 
226
- The "compress" setting tells Jekyll Asset Pipeline whether or not to compress the bundled assets. It is useful to set this setting to "false" while you are debugging your site's JavaScript. The "output_path" setting defines where generated bundles should be saved within the "_site" folder of your project.
253
+ > The "compress" setting tells Jekyll Asset Pipeline whether or not to compress the bundled assets. It is useful to set this setting to "false" while you are debugging your site's JavaScript. The "output\_path" setting defines where generated bundles should be saved within the "\_site" folder of your project.
227
254
 
228
255
  ## Contribute
229
256
 
@@ -231,22 +258,22 @@ You can contribute to the Jekyll Asset Pipeline by submitting a pull request [vi
231
258
 
232
259
  Key areas that I have identified for future improvement include:
233
260
 
234
- - __Tests, tests, tests.__ I'm embarassed to say that I didn't write a single test while building Jekyll Asset Pipeline. This started as a hack for my blog and quickly grew into a library as I tweaked it to support my own needs.
235
- - __CDN support.__ Jekyll Asset Pipeline should support using a CDN to host your assets.
261
+ - __Tests, tests, tests.__ I'm embarrassed to say that I didn't write a single test while building Jekyll Asset Pipeline. This started as a hack for my blog and quickly grew into a library as I tweaked it to support my own needs.
236
262
  - __Handle remote assets.__ Right now, Jekyll Asset Pipeline does not provide any way to include remote assets in bundles unless you save them locally before generating your site. Moshen's [Jekyll Asset Bundler](https://github.com/moshen/jekyll-asset_bundler) allows you to include remote assets, which I thought was pretty interesting. That said, I think it is generally better to keep remote assets separate so that they load asynchronously.
237
- - __Documentation.__ I wrote this readme to introduce people to Jekyll Asset Pipeline, but there should be better organized docs that can be more easily maintained.
238
263
  - __Successive preprocessing.__ Currently you can only preprocess a file once. It would be better if you could run an asset through multiple preprocessors before it gets compressed and bundled.
239
264
 
240
- Feel free to [message me on GitHub](http://github.com/matthodan) if you want to run an idea by me.
265
+ Feel free to message me on [Twitter](http://twitter.com/matthodan) or [Facebook](http://facebook.com/matthodan).
241
266
 
242
267
  ## Credits
243
268
 
244
269
  As I was building Jekyll Asset Pipeline, I came across a number of tools that I was able to draw inspiration and best practices from, but one stood out in particular... I have to give credit to [Moshen](https://github.com/moshen/) for creating the [Jekyll Asset Bundler](https://github.com/moshen/jekyll-asset_bundler).
245
270
 
246
- Jekyll Asset Bundler *almost* covered all of my needs when I set out to find an asset pipeline solution for my blog. The big missing features in my opinion were support for CoffeeScript and Sass. It also lacked a way to easily add new preprocessors that would have let me easily add support for these converters.
247
-
248
271
  I also have to give credit to [Mojombo](https://github.com/mojombo) for creating [Jekyll](https://github.com/mojombo/jekyll) in the first place.
249
272
 
273
+ ## License
274
+
275
+ Jekyll Asset Pipeline is released under the [MIT License](http://opensource.org/licenses/MIT).
276
+
250
277
  ---
251
278
 
252
279
  Like this project? You may want to read [my blog](http://www.matthodan.com).
@@ -10,6 +10,7 @@ module JekyllAssetPipeline
10
10
  end
11
11
  end
12
12
 
13
+ # Returns compressed content
13
14
  def compressed
14
15
  @compressed
15
16
  end
@@ -1,3 +1,3 @@
1
1
  module JekyllAssetPipeline
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
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.0.3
4
+ version: 0.0.4
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-11-23 00:00:00.000000000 Z
12
+ date: 2012-11-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll