Sha256: 0131d0f5dbe68556f4a6db69cbbacaed126b4ef679db69c5f68b723228d27fbd

Contents?: true

Size: 1.3 KB

Versions: 5

Compression:

Stored size: 1.3 KB

Contents

# Google Code Prettify

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

## Install

via [Bower](http://twitter.github.com/bower/)

	bower install google-code-prettify

or [Yeoman](http://yeoman.io/)

	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:

```javascript
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:

```js
// 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:

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

More information can be found in the original [README.html](http://google-code-prettify.googlecode.com/svn/trunk/README.html)

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
plate-lang-0.1.2 skeleton/vendor/google-code-prettify/README.md
plate-lang-0.1.1 skeleton/vendor/google-code-prettify/README.md
plate-lang-0.1.0 skeleton/vendor/google-code-prettify/README.md
patternfly-sass-1.2.0 tests/components/google-code-prettify/README.md
polymer-core-rails-0.2.0 app/assets/components/google-code-prettify/README.md