mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
A unit of work is a simple storage with write lock/unlock. The manager/package now share a unit of work instance. The unit of work is used to prevent shared dependencies from being cloned/copied "at the same time" fixing issue #81. The prune and version resolving algorithm was also not correct. It now resolves versions correctly, fixing issue #57. - Fix I/O errors caused by copying/clone repos simultaneously to the same dest. - Optimize the clone/copy step by avoiding it if the last resolved resource is the same. - Fix failing test (at least on my windows machine) - Add some more tests - Fix CS.
22 lines
819 B
JavaScript
22 lines
819 B
JavaScript
// ==========================================
|
|
// BOWER: Hogan.js renderWithColors extension
|
|
// ==========================================
|
|
// Copyright 2012 Twitter, Inc
|
|
// Licensed under The MIT License
|
|
// http://opensource.org/licenses/MIT
|
|
// ==========================================
|
|
|
|
var colors = require('colors');
|
|
var hogan = require('hogan.js');
|
|
var _ = require('lodash');
|
|
|
|
module.exports = hogan.Template.prototype.renderWithColors = function (context, partials, indent) {
|
|
context = _.extend({
|
|
yellow : function (s) { return s.yellow; },
|
|
green : function (s) { return s.green; },
|
|
cyan : function (s) { return s.cyan; },
|
|
grey : function (s) { return s.grey; },
|
|
red : function (s) { return s.red; }
|
|
}, context);
|
|
return this.ri([context], partials || {}, indent);
|
|
}; |