Skip to content

Commit

Permalink
Scaffold: Normalize repository
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Nov 29, 2018
1 parent 992bf87 commit dea87db
Show file tree
Hide file tree
Showing 13 changed files with 263 additions and 313 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Expand Up @@ -7,6 +7,7 @@ indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

[*.md]
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion .eslintrc
@@ -1,5 +1,5 @@
{
"extends": "@phated/iceddev/es5",
"extends": "gulp",
"rules": {
"no-console": 0
}
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
* text eol=lf
1 change: 1 addition & 0 deletions .npmrc
@@ -0,0 +1 @@
package-lock=false
5 changes: 5 additions & 0 deletions .travis.yml
@@ -1,6 +1,11 @@
sudo: false
language: node_js
node_js:
- '10'
- '8'
- '6'
- '4'
- '0.12'
- '0.10'
after_script:
- npm run coveralls
3 changes: 1 addition & 2 deletions LICENSE
@@ -1,7 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Blaine Bublitz <blaine.bublitz@gmail.com>
Based on gulp-util, copyright 2014 Fractal <contact@wearefractal.com>
Copyright (c) 2014, 2015, 2018 Blaine Bublitz <blaine.bublitz@gmail.com> and Eric Schoffstall <yo@contra.io>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
28 changes: 24 additions & 4 deletions README.md
@@ -1,10 +1,14 @@
# fancy-log
<p align="center">
<a href="http://gulpjs.com">
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
</a>
</p>

[![Travis Build Status](https://img.shields.io/travis/js-cli/fancy-log.svg?branch=master&label=travis&style=flat-square)](https://travis-ci.org/js-cli/fancy-log)
# fancy-log

Log things, prefixed with a timestamp
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]

__This module was pulled out of gulp-util for use inside the CLI__
Log things, prefixed with a timestamp.

## Usage

Expand Down Expand Up @@ -49,3 +53,19 @@ current time in HH:MM:ss format.
## License

MIT

[downloads-image]: http://img.shields.io/npm/dm/fancy-log.svg
[npm-url]: https://www.npmjs.com/package/fancy-log
[npm-image]: http://img.shields.io/npm/v/fancy-log.svg

[travis-url]: https://travis-ci.org/gulpjs/fancy-log
[travis-image]: http://img.shields.io/travis/gulpjs/fancy-log.svg?label=travis-ci

[appveyor-url]: https://ci.appveyor.com/project/gulpjs/fancy-log
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/fancy-log.svg?label=appveyor

[coveralls-url]: https://coveralls.io/r/gulpjs/fancy-log
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/fancy-log/master.svg

[gitter-url]: https://gitter.im/gulpjs/gulp
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
26 changes: 26 additions & 0 deletions appveyor.yml
@@ -0,0 +1,26 @@
# http://www.appveyor.com/docs/appveyor-yml
# http://www.appveyor.com/docs/lang/nodejs-iojs

environment:
matrix:
# node.js
- nodejs_version: "0.10"
- nodejs_version: "0.12"
- nodejs_version: "4"
- nodejs_version: "6"
- nodejs_version: "8"
- nodejs_version: "10"

install:
- ps: Install-Product node $env:nodejs_version
- npm install

test_script:
- node --version
- npm --version
- cmd: npm test

build: off

# build version format
version: "{build}"
18 changes: 8 additions & 10 deletions index.js
@@ -1,7 +1,5 @@
'use strict';
/*
Initial code from https://github.com/gulpjs/gulp-util/blob/v3.0.6/lib/log.js
*/

var gray = require('ansi-gray');
var timestamp = require('time-stamp');
var supportsColor = require('color-support');
Expand All @@ -26,39 +24,39 @@ function addColor(str) {
return str;
}

function getTimestamp(){
return '['+addColor(timestamp('HH:mm:ss'))+']';
function getTimestamp() {
return '[' + addColor(timestamp('HH:mm:ss')) + ']';
}

function log(){
function log() {
var time = getTimestamp();
process.stdout.write(time + ' ');
console.log.apply(console, arguments);
return this;
}

function info(){
function info() {
var time = getTimestamp();
process.stdout.write(time + ' ');
console.info.apply(console, arguments);
return this;
}

function dir(){
function dir() {
var time = getTimestamp();
process.stdout.write(time + ' ');
console.dir.apply(console, arguments);
return this;
}

function warn(){
function warn() {
var time = getTimestamp();
process.stderr.write(time + ' ');
console.warn.apply(console, arguments);
return this;
}

function error(){
function error() {
var time = getTimestamp();
process.stderr.write(time + ' ');
console.error.apply(console, arguments);
Expand Down
25 changes: 15 additions & 10 deletions package.json
@@ -1,12 +1,13 @@
{
"name": "fancy-log",
"version": "1.3.2",
"description": "Log things, prefixed with a timestamp",
"author": "Blaine Bublitz <blaine.bublitz@gmail.com>",
"description": "Log things, prefixed with a timestamp.",
"author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
"contributors": [
"Blaine Bublitz <blaine.bublitz@gmail.com>",
"Aman Mittal (http://amandeepmittal.github.io/)"
],
"repository": "js-cli/fancy-log",
"repository": "gulpjs/fancy-log",
"license": "MIT",
"engines": {
"node": ">= 0.10"
Expand All @@ -17,20 +18,24 @@
"index.js"
],
"scripts": {
"test": "lab -cvL test.js"
"lint": "eslint .",
"pretest": "npm run lint",
"test": "mocha --async-only",
"cover": "istanbul cover _mocha --report lcovonly",
"coveralls": "npm run cover && istanbul-coveralls"
},
"dependencies": {
"ansi-gray": "^0.1.1",
"color-support": "^1.1.3",
"time-stamp": "^1.0.0"
},
"devDependencies": {
"@phated/eslint-config-iceddev": "^0.2.1",
"code": "^1.5.0",
"eslint": "^1.3.1",
"eslint-plugin-mocha": "^0.5.1",
"eslint-plugin-react": "^3.3.1",
"lab": "^5.16.0"
"eslint": "^2.13.0",
"eslint-config-gulp": "^3.0.1",
"expect": "^1.20.2",
"istanbul": "^0.4.3",
"istanbul-coveralls": "^1.0.3",
"mocha": "^3.5.3"
},
"keywords": [
"console.log",
Expand Down

0 comments on commit dea87db

Please sign in to comment.