clear
This commit is contained in:
23
node_modules/fancy-log/LICENSE
generated
vendored
Normal file
23
node_modules/fancy-log/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Blaine Bublitz <blaine.bublitz@gmail.com>
|
||||
Based on gulp-util, copyright 2014 Fractal <contact@wearefractal.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
51
node_modules/fancy-log/README.md
generated
vendored
Normal file
51
node_modules/fancy-log/README.md
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
# fancy-log
|
||||
|
||||
[](https://travis-ci.org/js-cli/fancy-log)
|
||||
|
||||
Log things, prefixed with a timestamp
|
||||
|
||||
__This module was pulled out of gulp-util for use inside the CLI__
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var log = require('fancy-log');
|
||||
|
||||
log('a message');
|
||||
// [16:27:02] a message
|
||||
|
||||
log.error('oh no!');
|
||||
// [16:27:02] oh no!
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `log(msg...)`
|
||||
|
||||
Logs the message as if you called `console.log` but prefixes the output with the
|
||||
current time in HH:MM:ss format.
|
||||
|
||||
### `log.error(msg...)`
|
||||
|
||||
Logs the message as if you called `console.error` but prefixes the output with the
|
||||
current time in HH:MM:ss format.
|
||||
|
||||
### `log.warn(msg...)`
|
||||
|
||||
Logs the message as if you called `console.warn` but prefixes the output with the
|
||||
current time in HH:MM:ss format.
|
||||
|
||||
|
||||
### `log.info(msg...)`
|
||||
|
||||
Logs the message as if you called `console.info` but prefixes the output with the
|
||||
current time in HH:MM:ss format.
|
||||
|
||||
### `log.dir(msg...)`
|
||||
|
||||
Logs the message as if you called `console.dir` but prefixes the output with the
|
||||
current time in HH:MM:ss format.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
51
node_modules/fancy-log/index.js
generated
vendored
Normal file
51
node_modules/fancy-log/index.js
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
'use strict';
|
||||
/*
|
||||
Initial code from https://github.com/gulpjs/gulp-util/blob/v3.0.6/lib/log.js
|
||||
*/
|
||||
var chalk = require('chalk');
|
||||
var timestamp = require('time-stamp');
|
||||
|
||||
function getTimestamp(){
|
||||
return '['+chalk.grey(timestamp('HH:mm:ss'))+']';
|
||||
}
|
||||
|
||||
function log(){
|
||||
var time = getTimestamp();
|
||||
process.stdout.write(time + ' ');
|
||||
console.log.apply(console, arguments);
|
||||
return this;
|
||||
}
|
||||
|
||||
function info(){
|
||||
var time = getTimestamp();
|
||||
process.stdout.write(time + ' ');
|
||||
console.info.apply(console, arguments);
|
||||
return this;
|
||||
}
|
||||
|
||||
function dir(){
|
||||
var time = getTimestamp();
|
||||
process.stdout.write(time + ' ');
|
||||
console.dir.apply(console, arguments);
|
||||
return this;
|
||||
}
|
||||
|
||||
function warn(){
|
||||
var time = getTimestamp();
|
||||
process.stderr.write(time + ' ');
|
||||
console.warn.apply(console, arguments);
|
||||
return this;
|
||||
}
|
||||
|
||||
function error(){
|
||||
var time = getTimestamp();
|
||||
process.stderr.write(time + ' ');
|
||||
console.error.apply(console, arguments);
|
||||
return this;
|
||||
}
|
||||
|
||||
module.exports = log;
|
||||
module.exports.info = info;
|
||||
module.exports.dir = dir;
|
||||
module.exports.warn = warn;
|
||||
module.exports.error = error;
|
||||
116
node_modules/fancy-log/package.json
generated
vendored
Normal file
116
node_modules/fancy-log/package.json
generated
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "fancy-log@^1.1.0",
|
||||
"scope": null,
|
||||
"escapedName": "fancy-log",
|
||||
"name": "fancy-log",
|
||||
"rawSpec": "^1.1.0",
|
||||
"spec": ">=1.1.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\gulp-util"
|
||||
]
|
||||
],
|
||||
"_from": "fancy-log@>=1.1.0 <2.0.0",
|
||||
"_id": "fancy-log@1.3.0",
|
||||
"_inCache": true,
|
||||
"_location": "/fancy-log",
|
||||
"_nodeVersion": "0.10.41",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-18-east.internal.npmjs.com",
|
||||
"tmp": "tmp/fancy-log-1.3.0.tgz_1482797779199_0.34764629206620157"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "phated",
|
||||
"email": "blaine.bublitz@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.15.2",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "fancy-log@^1.1.0",
|
||||
"scope": null,
|
||||
"escapedName": "fancy-log",
|
||||
"name": "fancy-log",
|
||||
"rawSpec": "^1.1.0",
|
||||
"spec": ">=1.1.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-uglify",
|
||||
"/gulp-util"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz",
|
||||
"_shasum": "45be17d02bb9917d60ccffd4995c999e6c8c9948",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "fancy-log@^1.1.0",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\gulp-util",
|
||||
"author": {
|
||||
"name": "Blaine Bublitz",
|
||||
"email": "blaine.bublitz@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/js-cli/fancy-log/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Aman Mittal",
|
||||
"url": "http://amandeepmittal.github.io/"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"chalk": "^1.1.1",
|
||||
"time-stamp": "^1.0.0"
|
||||
},
|
||||
"description": "Log things, prefixed with a timestamp",
|
||||
"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"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "45be17d02bb9917d60ccffd4995c999e6c8c9948",
|
||||
"tarball": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "dbbc97315f2e59a5b3fa1df7eae94fc32306fe71",
|
||||
"homepage": "https://github.com/js-cli/fancy-log#readme",
|
||||
"keywords": [
|
||||
"console.log",
|
||||
"log",
|
||||
"logger",
|
||||
"logging",
|
||||
"pretty",
|
||||
"timestamp"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "phated",
|
||||
"email": "blaine@iceddev.com"
|
||||
}
|
||||
],
|
||||
"name": "fancy-log",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/js-cli/fancy-log.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "lab -cvL test.js"
|
||||
},
|
||||
"version": "1.3.0"
|
||||
}
|
||||
Reference in New Issue
Block a user