Skip to content

Commit

Permalink
drop chalk-twig-filters dependency - fixes #14
Browse files Browse the repository at this point in the history
it's so little code anyways
  • Loading branch information
sindresorhus committed Jan 12, 2015
1 parent 0fdda09 commit 9c1cfc1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 9c1cfc1

Please sign in to comment.