sapegin's social-likes (old) with removed jquery
 
 
 
 
 
Go to file
ReadmeCritic 68aa955af2 Update README URLs based on HTTP redirects 2015-11-20 08:15:29 -08:00
contrib v3.0.13 2015-02-16 15:34:11 +03:00
specs Add test case with unexisting domain and zeroes 2015-11-17 12:54:08 +03:00
src Trigger counter update if number equals zero and zeroes option specified 2015-11-17 12:55:30 +03:00
.gitignore Skin switcher on demo page. 2013-12-24 18:04:38 +04:00
Changelog.md Changelog. 2015-03-10 11:24:32 +03:00
Contributing.md Tweak readme and contributing guidelines. 2014-04-10 11:01:30 +04:00
Readme.md Update README URLs based on HTTP redirects 2015-11-20 08:15:29 -08:00
bower.json Add license to Bower manifest. FIx #135. 2015-08-04 08:55:54 +02:00
license.md Tweak license. 2014-04-04 10:20:19 +04:00
social-likes.jquery.json v3.0.14 2015-03-10 11:24:39 +03:00
social-likes.min.js v3.0.14 2015-03-10 11:24:39 +03:00
social-likes_birman.css v3.0.14 2015-03-10 11:24:39 +03:00
social-likes_classic.css v3.0.14 2015-03-10 11:24:39 +03:00
social-likes_flat.css v3.0.14 2015-03-10 11:24:39 +03:00

Readme.md

Bower components builder for Grunt

Build Status Built with Grunt

Automatic concatenation of installed Bower components (JS and/or CSS) in the right order.

Installation

This plugin requires Grunt 0.4.

$ npm install grunt-bower-concat --save-dev

Configuration

Add somewhere in your Gruntfile.js:

grunt.loadNpmTasks('grunt-bower-concat');

Inside your Gruntfile.js file add a section named bower_concat. See Parameters section below for details.

Options

separator

Type: String Default: grunt.util.linefeed

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.

options: { separator : ';' }

Parameters

dest

Type: String, optional (at least one of [dest, cssDest] must exist).

Name of JS file where result of concatenation will be saved.

cssDest

Type: String, optional (at least one of [dest, cssDest] must exist).

Name of CSS file where result of concatenation will be saved.

exclude

Type: String|Array, optional.

List of components you want to exclude.

exclude: [
  'jquery',
  'modernizr'
]

include

Type: String|Array, optional.

By default bower-concat will include all installed in project components. Using include option you can manually specify which components should be included.

include: [
  'underscore',
  'backbone'
]

dependencies

Type: Object, optional.

Unfortunately not all Bower components list their dependencies. If components concatenate in the wrong order, use this option to manually specify dependencies for those components.

dependencies: {
  'underscore': 'jquery',
  'mygallery': ['jquery', 'fotorama']
}

mainFiles

Type: Object, optional.

Some Bower components dont list their main files or (more likely) dont have bower.json file at all. In this case bower-concat will try to guess main file but sometimes it cant or choose wrong one. You could explicitly define main files for that components.

mainFiles: {
  'svg.js': 'dist/svg.js',
  'mygallery': ['src/base.js', 'src/gallery.js', 'src/style.css']
}

callback

Type: Function, optional.

This function will be called for every Bower component and allows you to change main files chosen by bower-concat.

callback: function(mainFiles, component) {
  return _.map(mainFiles, function(filepath) {
    // Use minified files if available
    var min = filepath.replace(/\.js$/, '.min.js');
    return grunt.file.exists(min) ? min : filepath;
  });
}

process

Type: Function, optional.

This function will be called for every Bower component and allows you to change the contents of every file.

process: function(src) {
	// wrap each library in a self executing function with "use strict"
  return "\n" +
    ";(function( window, jQuery, angular, undefined ){ \n 'use strict';\n\n" +
    src +
    "\n\n}( window, jQuery, angular ));";
}

bowerOptions

Type: Object, optional.

Bower specific options that will be passed in during the bower.commands calls.

bowerOptions: {
  relative: false
}

includeDev

Type: Boolean, default: false.

Include devDependencies along with regular dependencies.

Config Example

bower_concat: {
  all: {
    dest: 'build/_bower.js',
    cssDest: 'build/_bower.css',
    exclude: [
      'jquery',
      'modernizr'
    ],
    dependencies: {
      'underscore': 'jquery',
      'backbone': 'underscore',
      'jquery-mousewheel': 'jquery'
    },
    bowerOptions: {
      relative: false
    }
  }
}

Changelog

The changelog can be found in the Changelog.md file.


License

The MIT License, see the included License.md file.