gentelella/vendors/google-code-prettify
christianesperar 6a6db2ea23 Put dependecy libraries to bower for easy updating
Update also fix some following problem:
- Switcher now working
- Datatable header fix example is now working
- Add missing starrr ratings
- Some mobile responsiveness on table.html page
2016-04-24 22:26:16 +08:00
..
bin Put dependecy libraries to bower for easy updating 2016-04-24 22:26:16 +08:00
examples Put dependecy libraries to bower for easy updating 2016-04-24 22:26:16 +08:00
src Put dependecy libraries to bower for easy updating 2016-04-24 22:26:16 +08:00
styles Put dependecy libraries to bower for easy updating 2016-04-24 22:26:16 +08:00
.bower.json Put dependecy libraries to bower for easy updating 2016-04-24 22:26:16 +08:00
bower.json Put dependecy libraries to bower for easy updating 2016-04-24 22:26:16 +08:00
CHANGES.html Put dependecy libraries to bower for easy updating 2016-04-24 22:26:16 +08:00
COPYING Put dependecy libraries to bower for easy updating 2016-04-24 22:26:16 +08:00
README-zh-Hans.html Put dependecy libraries to bower for easy updating 2016-04-24 22:26:16 +08:00
README.html Put dependecy libraries to bower for easy updating 2016-04-24 22:26:16 +08:00
README.md Put dependecy libraries to bower for easy updating 2016-04-24 22:26:16 +08:00

Google Code Prettify

Direct port of svn into git from http://google-code-prettify.googlecode.com/svn/trunk/

Install

via Bower

bower install google-code-prettify

or Yeoman

yeoman install google-code-prettify

Usage

The prettify script is AMD compatible and can be used modularly. Here is an example of it in an AMD module:

define(['jquery', 'prettify'], function($, prettify){
	var code = null;
	$('pre').addClass('prettyprint').each(function(idx, el){
			code = el.firstChild;
			code.innerHTML = prettify.prettyPrintOne(code.innerHTML);
		})
	);
});

This version of google-code-prettify defines an anonymous module, which is more flexible. To allow your AMD loader to find google-code-prettify with a more convenient name, map a path to it as follows:

// using RequireJS
require.config({
	prettify: 'bower_components/google-code-prettify/prettify'
});

// using curl.js
curl.config({
	prettify: 'bower_components/google-code-prettify/prettify'
});

Or it may just be used in a global context like the following:

(function(){
	$('pre').addClass('prettyprint');
	prettyPrint();
})();

More information can be found in the original README.html