README.md in jekyll-assets-0.14.0 vs README.md in jekyll-assets-1.0.0.pre.alpha0

- old
+ new

@@ -1,6 +1,6 @@ -# Jekyll::AssetsPlugin +# Jekyll::Assets [![Gem Version](https://badge.fury.io/rb/jekyll-assets.svg)](http://badge.fury.io/rb/jekyll-assets) [![Build Status](https://travis-ci.org/ixti/jekyll-assets.svg?branch=master)](http://travis-ci.org/ixti/jekyll-assets) [![Dependency Status](https://gemnasium.com/ixti/jekyll-assets.svg)](https://gemnasium.com/ixti/jekyll-assets) [![Code Climate](https://codeclimate.com/github/ixti/jekyll-assets.svg)](https://codeclimate.com/github/ixti/jekyll-assets) @@ -20,14 +20,10 @@ - Adds MD5 fingerprint suffix for _cache busting_. That means your `app.css` will become `app-908e25f4bf641868d8683022a5b62f54.css`. See `cachebust` configuration option for other variants. - Produce gzipped versions of assets. See `gzip` configuration option for details. -- [Compass][compass], [Bourbon][bourbon] and [Neat][neat] built-in support. - See "Custom Vendors" below. -- [Rails Assets][rails_assets] support -- [Autoprefixer][autoprefixer] support [compass]: http://compass-style.org/ [bourbon]: http://bourbon.io/ [neat]: http://neat.bourbon.io/ [autoprefixer]: https://github.com/postcss/autoprefixer @@ -72,11 +68,11 @@ First of all make sure to require it. Common practice is to add following line into `_plugins/ext.rb` file: ``` ruby -require "jekyll-assets" +require "jekyll/assets" ``` Once plugin installed, you'll have following Liquid tags available: - `{% javascript app %}`: Generates `<script>` tag for `app.js` @@ -312,11 +308,11 @@ but copyrights info. In this case you can define and use your own compressor. To do so, first let's define new compressor in `_plugins/ext.rb`: ``` ruby -require "jekyll-assets" +require "jekyll/assets" require "sprockets" Sprockets.register_compressor 'application/javascript', :my_uglifier, Uglifier.new(:comments => :copyright) ``` @@ -369,127 +365,9 @@ Sprockets.append_path "/my/vendor" ``` That's it, now jekyll-assets will try to look for assets inside `/my/vendor` path first. - - -### Built-in Vendors Support - -For your comfort jekyll-assets has built-in support for some popular libraries. - - -#### Compass Support - -Require `jekyll-assets/compass` to enable, e.g.: - -``` ruby -require "jekyll-assets" -require "jekyll-assets/compass" -``` - -Now you can add `@import "compass"` in your SASS assets to get Compass goodies. - -*Note* that if you want to use other than default Compass plugins/frameworks, - you must require them BEFORE `jekyll-assets/compass`. - - -#### Bootstrap Support - -Require `jekyll-assets/bootstrap` to enable, e.g.: - -``` ruby -require "jekyll-assets" - -# bootstrap requires minimum precision of 10, see https://github.com/twbs/bootstrap-sass/issues/409 -::Sass::Script::Number.precision = [10, ::Sass::Script::Number.precision].max - -require "jekyll-assets/bootstrap" -``` - -Now you can add `@import "bootstrap"` in your SASS assets to get Bootstrap goodies. - - -#### Bourbon Support - -Require `jekyll-assets/bourbon` to enable, e.g.: - -``` ruby -require "jekyll-assets" -require "jekyll-assets/bourbon" -``` - -Now you can add `@import "bourbon"` in your SASS assets to get Bourbon goodies. - - -#### Font Awesome - -Require `jekyll-assets/font-awesome` to enable, e.g.: - -``` ruby -require "jekyll-assets" -require "jekyll-assets/font-awesome" -``` - -Now you can add `@import "font-awesome"` in your SASS assets to get Font Awesome goodies. - - -#### Neat Support - -Require `jekyll-assets/neat` to enable, e.g.: - -``` ruby -require "jekyll-assets" -require "jekyll-assets/neat" -``` - -Now you can add `@import "neat"` in your SASS assets to get Neat goodies. - - -### Rails Assets Support - -[Rails Assets][rails_assets] allows you to easily install Bower dependencies via Bundler. - -Install your Bower dependencies in the `rails_assets` group in your `Gemfile`: - -``` ruby -group :rails_assets do - gem "rails-assets-jquery" - gem "rails-assets-angular" -end -``` - -Require `jekyll-assets/rails-assets` to enable, e.g.: - -``` ruby -require "jekyll-assets" -require "jekyll-assets/rails-assets" -``` - -Now you can `require` these dependencies in your assets, e.g. `site.js`: - -``` javascript -//= require jquery -//= require angular -``` - -## Autoprefixer - -To enable Autoprefixer, add `autoprefixer-rails` to your `Gemfile`: - -``` ruby -gem "autoprefixer-rails" -``` - -You can configure it by creating an `autoprefixer.yml` file in your `source` -directory (by default your project's root): - -``` yaml -browsers: - - "last 1 version" - - "> 1%" - - "Explorer 10" -``` ## The Directive Processor *Note:* This section extracted from [Sprockets][sprockets] README.