Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: bower_components/google-code-prettify/README.md

Issue 786953007: npm_modules: Fork bower_components into Polymer 0.4.0 and 0.5.0 versions (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Google Code Prettify
2
3 Direct port of svn into git from http://google-code-prettify.googlecode.com/svn/ trunk/
4
5 ## Install
6
7 via [Bower](http://twitter.github.com/bower/)
8
9 bower install google-code-prettify
10
11 or [Yeoman](http://yeoman.io/)
12
13 yeoman install google-code-prettify
14
15
16 ## Usage
17
18 The prettify script is AMD compatible and can be used modularly. Here is an exam ple of it in an AMD module:
19
20 ```javascript
21 define(['jquery', 'prettify'], function($, prettify){
22 var code = null;
23 $('pre').addClass('prettyprint').each(function(idx, el){
24 code = el.firstChild;
25 code.innerHTML = prettify.prettyPrintOne(code.innerHTML) ;
26 })
27 );
28 });
29 ```
30
31 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 con venient name, map a path to it as follows:
32
33 ```js
34 // using RequireJS
35 require.config({
36 prettify: 'bower_components/google-code-prettify/prettify'
37 });
38
39 // using curl.js
40 curl.config({
41 prettify: 'bower_components/google-code-prettify/prettify'
42 });
43 ```
44
45 Or it may just be used in a global context like the following:
46
47 ```javascript
48 (function(){
49 $('pre').addClass('prettyprint');
50 prettyPrint();
51 })();
52 ```
53
54 More information can be found in the original [README.html](http://google-code-p rettify.googlecode.com/svn/trunk/README.html)
OLDNEW
« no previous file with comments | « bower_components/google-code-prettify/README.html ('k') | bower_components/google-code-prettify/README-zh-Hans.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698