diff --git a/lib/message.js b/lib/message.js index edeae64..dc407eb 100644 --- a/lib/message.js +++ b/lib/message.js @@ -3,7 +3,13 @@ var fs = require('fs'); var path = require('path'); var chalk = require('chalk'); var Twig = require('twig'); -require('chalk-twig-filters')(Twig, chalk); + +// add chalk to twig +Object.keys(chalk.styles).forEach(function (style) { + Twig.extendFilter(style, function (input) { + return chalk[style](input); + }); +}); exports.get = function (message, data) { var fileTemplate = fs.readFileSync(path.join(__dirname, '/messages', message + '.twig'), 'utf8'); diff --git a/package.json b/package.json index bdc8b1f..2259ed4 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "dependencies": { "async": "^0.9.0", "chalk": "^0.5.1", - "chalk-twig-filters": "0.0.3", "lodash": "^2.4.1", "log-symbols": "^1.0.1", "require-dir": "^0.1.0",