google-code-prettify

WebJar for google-code-prettify

License

License

Categories

Categories

Github Development Tools Version Controls
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

github-com-emeraldjava-google-code-prettify
Last Version

Last Version

1.0.5
Release Date

Release Date

Type

Type

jar
Description

Description

google-code-prettify
WebJar for google-code-prettify
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/emeraldjava/google-code-prettify

Download github-com-emeraldjava-google-code-prettify

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-emeraldjava-google-code-prettify/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-emeraldjava-google-code-prettify</artifactId>
    <version>1.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-emeraldjava-google-code-prettify/
implementation 'org.webjars.npm:github-com-emeraldjava-google-code-prettify:1.0.5'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-emeraldjava-google-code-prettify/
implementation ("org.webjars.npm:github-com-emeraldjava-google-code-prettify:1.0.5")
'org.webjars.npm:github-com-emeraldjava-google-code-prettify:jar:1.0.5'
<dependency org="org.webjars.npm" name="github-com-emeraldjava-google-code-prettify" rev="1.0.5">
  <artifact name="github-com-emeraldjava-google-code-prettify" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-emeraldjava-google-code-prettify', version='1.0.5')
)
libraryDependencies += "org.webjars.npm" % "github-com-emeraldjava-google-code-prettify" % "1.0.5"
[org.webjars.npm/github-com-emeraldjava-google-code-prettify "1.0.5"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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

Versions

Version
1.0.5