# google-code-prettify

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

Latest version **1.0.5** (published 2016-08-12) · 0 weekly downloads

## Install

```sh
npm install google-code-prettify
pnpm add google-code-prettify
yarn add google-code-prettify
bun add google-code-prettify
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2016-08-12 |
| First published | 2016-01-28 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mattdsteele |

## Links

- npm: https://www.npmjs.com/package/google-code-prettify
- npm.io page: https://npm.io/package/google-code-prettify

## Recent versions

- 1.0.5 (latest) — 2016-08-12
- 1.0.4 — 2016-08-11
- 1.0.1 — 2016-01-28

## README

# 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)

---
_Source: https://npm.io/package/google-code-prettify · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
