diff --git a/Readme.md b/Readme.md index 96ce171..86ca9f4 100644 --- a/Readme.md +++ b/Readme.md @@ -1,401 +1,187 @@ +# Bower components builder for Grunt -# Social Likes - -[![Bower version](https://badge.fury.io/bo/social-likes.svg)](http://badge.fury.io/bo/social-likes) +[![Build Status](https://travis-ci.org/sapegin/grunt-bower-concat.png)](https://travis-ci.org/sapegin/grunt-bower-concat) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/) -Beautiful share buttons with counters for popular social networks: Facebook, Twitter, Google+, Pinterest, Vkontakte, etc. Uses jQuery. - -[![](http://wow.sapegin.me/image/1f1U2S130d3R/social-likes.png)](http://sapegin.github.io/social-likes/) - -[See demo](http://sapegin.github.io/social-likes/) - -## Features - -- Easy to install. -- Beautiful and all in one style (with three different skins). -- Won’t explode your page’s layout. +Automatic concatenation of installed [Bower](https://github.com/bower/bower) components (JS and/or CSS) in the right order. -## Installation and configuration +## Installation -Use [interactive builder](http://sapegin.github.io/social-likes/) to generate the code. +This plugin requires Grunt 0.4. -Or install via [Bower](http://bower.io/): `$ bower install social-likes`. - - -## Advanced configuration - -### Layout - -#### Default - -All buttons in a row. - -```html -
+``` +$ npm install grunt-bower-concat --save-dev ``` -#### Vertical -All buttons in a column. +## Configuration -```html - +Add somewhere in your `Gruntfile.js`: + +```javascript +grunt.loadNpmTasks('grunt-bower-concat'); ``` -#### Single button - -One button with a counter (summ of all the networks). Opens popup with like buttons in vertical layout. Use `data-single-title` attribute to change button title. - -```html - -``` - -#### Icons only - -If you want to remove button titles add `social-likes_notext` class to make it looks better. - -```html - -``` +Inside your `Gruntfile.js` file add a section named `bower_concat`. See Parameters section below for details. ### Options -Options define via HTML data attributes or JavaScript parameters object. +#### separator -`url` +Type: `String` Default: `grunt.util.linefeed` -URL of shareable page. Current page by default. +Concatenated files will be joined on this string. If you're post-processing concatenated JavaScript files with a minifier, you may need to use a semicolon ';\n' as the separator. Separator is only applied to concatenated JS files. -`title` +`options: { separator : ';' }` -Title for Twitter, Vkontakte and LiveJournal. Current page’s title by default. +### Parameters -`html` -HTML code for LiveJournal button. By default tag with link to current page. +#### dest -`counters` +Type: `String`, optional (at least one of [`dest`, `cssDest`] must exist). -Disables “likes” counters when “no”. Default: “yes”. +Name of JS file where result of concatenation will be saved. -`zeroes` +#### cssDest -Show counters even when number is `0`. Default: “no”. +Type: `String`, optional (at least one of [`dest`, `cssDest`] must exist). -`single-title` +Name of CSS file where result of concatenation will be saved. -Share button title for “single button” mode. Default: “Share”. +#### exclude -Examples: +Type: `String|Array`, optional. -```html - -``` - -```html - -``` +List of components you want to exclude. ```js -$('.social-likes').socialLikes({ - url: 'https://github.com/sapegin/social-likes/', - title: 'Beautiful “like” buttons with counters for popular social networks', - counters: true, - singleTitle: 'Share it!' -}); +exclude: [ + 'jquery', + 'modernizr' +] ``` +#### include -### Services specific options +Type: `String|Array`, optional. -#### Twitter +By default bower-concat will include all installed in project components. Using `include` option you can manually specify which components should be included. -You can specify `via` (site’s or your own Twitter) and `related` (any other Twitter you want to advertise) values for `