merge npm package into main repo

This commit is contained in:
Rodrigo Fernandes 2015-07-19 00:23:36 +01:00
parent 5ee366a01e
commit 759239133f
8 changed files with 1272 additions and 1017 deletions

View file

@ -22,7 +22,9 @@ Diff to Html generates pretty HTML diffs from git word diff output.
* [Node Module](https://www.npmjs.org/package/diff2html)
* Manually download and import `diff2html.js` into your page
* [Bower Package](http://bower.io/search/?q=diff2html)
* Manually download and import `dist/diff2html.min.js` into your page
## How to use

3
bin/diff2html Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env node
require("../src/diff2html.js");

View file

@ -2,38 +2,55 @@
"name": "diff2html",
"version": "0.2.5",
"homepage": "https://github.com/rtfpessoa/diff2html",
"description": "Fast Diff to colorized HTML",
"keywords": [
"git",
"diff",
"pretty",
"side",
"line",
"side-by-side",
"line-by-line",
"character",
"highlight",
"pretty",
"color",
"html",
"diff2html",
"difftohtml",
"colorized"
],
"authors": [
"Rodrigo Fernandes <rtfrodrigo@gmail.com>"
],
"repository": {
"type": "git",
"url": "git://github.com/rtfpessoa/diff2html.git"
"type": "git",
"url": "git://github.com/rtfpessoa/diff2html.git"
},
"description": "Fast Diff to colorized HTML",
"main": "./src/diff2html.js",
"keywords": [
"git",
"diff",
"pretty",
"side",
"line",
"side-by-side",
"line-by-line",
"character",
"highlight",
"pretty",
"color",
"html",
"diff2html",
"difftohtml",
"colorized"
],
"license": "MIT",
"moduleType": [
"globals",
"node"
],
"dependencies": {
"jsdiff": ">= 1.4.0"
},
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
"tests",
"bin",
"package.json",
"release.sh"
]
}

1075
dist/diff2html.js vendored

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

72
package.json Normal file
View file

@ -0,0 +1,72 @@
{
"name": "diff2html",
"version": "0.2.4",
"homepage": "https://www.github.com/rtfpessoa/diff2html",
"description": "Fast Diff to colorized HTML",
"keywords": [
"git",
"diff",
"pretty",
"side",
"line",
"side-by-side",
"line-by-line",
"character",
"highlight",
"pretty",
"color",
"html",
"diff2html",
"difftohtml",
"colorized"
],
"author": {
"name": "Rodrigo Fernandes",
"email": "rtfrodrigo@gmail.com"
},
"repository": {
"type": "git",
"url": "https://www.github.com/rtfpessoa/diff2html.git"
},
"bugs": {
"url": "https://www.github.com/rtfpessoa/diff2html/issues"
},
"engines": {
"node": ">=0.10"
},
"preferGlobal": "true",
"scripts": {
"test": ""
},
"bin": {
"diff2html-lib": "./bin/diff2html"
},
"main": "./src/diff2html.js",
"dependencies": {
"diff": "1.4.0"
},
"devDependencies": {},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/rtfpessoa/diff2html/blob/master/LICENSE"
}
],
"files": [
"bin",
"lib",
"src"
]
}

View file

@ -8,7 +8,9 @@
(function (global, undefined) {
// dirty hack for browser compatibility
var jsDiff = (typeof JsDiff !== "undefined" && JsDiff) || require("../lib/diff.js");
var jsDiff = (typeof JsDiff !== "undefined" && JsDiff) ||
require("diff") ||
require("../lib/diff.js");
var utils = require("./utils.js").Utils;
function PrinterUtils() {