From 423f6346221ae5aaca51e6dbc4426e8649152496 Mon Sep 17 00:00:00 2001 From: PhilKunz Date: Tue, 2 Feb 2016 15:02:41 +0100 Subject: [PATCH] fix deps --- index.js | 19 ++----------------- package.json | 6 +++--- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/index.js b/index.js index 165436c..12754d2 100644 --- a/index.js +++ b/index.js @@ -188,23 +188,8 @@ var BeautylogNodeLog; var BeautylogNodeCode; (function (BeautylogNodeCode) { BeautylogNodeCode.init = function () { - var consoleHighlight = function (code, language) { - var fs = require('fs'), path = require('path'), htmlout = require('html2console'), hljs = require('highlight.js'); - var css = fs.readFileSync(path.join(__dirname, 'code.css'), 'utf8'); - var result; - if (typeof language === "undefined") { - result = hljs.highlight(language, code); - } - else { - result = hljs.highlightAuto(code); - } - ; - var html = result.value; - var output = htmlout.withCSS(css); - //console.log(html); - return output('
' + html + '
'); - }; var codeFunction = function (codeString, options) { + var hlight = require("hlight"); var codeSnippet = { source: codeString, highlighted: "default" @@ -215,7 +200,7 @@ var BeautylogNodeCode; } ; if (typeof options != "undefined") { - codeSnippet.highlighted = consoleHighlight(codeSnippet.source, options.language); + codeSnippet.highlighted = hlight(codeSnippet.source, options.language); } }; return codeFunction; diff --git a/package.json b/package.json index d54712f..84695f2 100644 --- a/package.json +++ b/package.json @@ -34,13 +34,13 @@ "cli-table2": "^0.1.9", "colors": "1.1.2", "highlight.js": "^9.1.0", - "hlight": "0.0.1", + "hlight": "0.0.2", "smartenv": "0.0.15" }, "devDependencies": { "easyserve": "0.0.5", "gulp": "^3.9.0", - "gulp-browser": "1.0.3", - "npmts": "^1.0.12" + "gulp-browser": "1.0.6", + "npmts": "^2.0.2" } }