UNPKG

alpha-one

Version:

ideas about recurring tasks in Web- and Backend-Application building

40 lines (32 loc) 1.56 kB
############################################################################################################ # njs_fs = require 'fs' njs_path = require 'path' # njs_cp = require 'child_process' #........................................................................................................... TYPES = require 'coffeenode-types' TRM = require 'coffeenode-trm' rpr = TRM.rpr.bind TRM badge = 'alpha/git' echo = TRM.echo.bind TRM log = TRM.get_logger 'plain', badge info = TRM.get_logger 'info', badge whisper = TRM.get_logger 'whisper', badge alert = TRM.get_logger 'alert', badge debug = TRM.get_logger 'debug', badge warn = TRM.get_logger 'warn', badge #........................................................................................................... git = require 'gift' git_route = njs_path.join __dirname, '../.git' git_route = '/Users/flow/cnd/node_modules/coffeenode-trm/.git' repo = git git_route TRM.dir repo repo.commits ( erroror, commits ) -> throw error if error? commits.sort ( a, b ) -> a = 1 * a[ 'committed_date' ] b = 1 * b[ 'committed_date' ] return +1 if a > b return -1 if a < b return 0 for commit in commits info commit[ 'committed_date' ], ( TRM.grey commit[ 'message' ] )