Skip to content

Commit cade00d

Browse files
committed
Scaffold: Normalize repository
1 parent ffb0944 commit cade00d

File tree

11 files changed

+86
-21
lines changed

11 files changed

+86
-21
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ indent_size = 2
77
charset = utf-8
88
trim_trailing_whitespace = true
99
insert_final_newline = true
10+
end_of_line = lf
1011

1112
[*.md]
1213
trim_trailing_whitespace = false

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text eol=lf

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
sudo: false
22
language: node_js
33
node_js:
4-
- '9'
4+
- '10'
55
- '8'
66
- '6'
77
- '4'
88
- '0.12'
99
- '0.10'
10+
after_script:
11+
- npm run coveralls

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014 Blaine Bublitz
3+
Copyright (c) 2014, 2015, 2018 Blaine Bublitz <blaine.bublitz@gmail.com> and Eric Schoffstall <yo@contra.io>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1+
<p align="center">
2+
<a href="http://gulpjs.com">
3+
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
4+
</a>
5+
</p>
6+
17
# glogg
28

3-
[![Travis Build Status](https://img.shields.io/travis/js-cli/glogg/master.svg?label=travis&style=flat-square)](https://travis-ci.org/js-cli/glogg)
9+
[![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]
410

5-
Global logging utility
11+
Global logging utility.
612

713
## Usage
814

@@ -90,3 +96,19 @@ the logger methods.
9096
## License
9197

9298
MIT
99+
100+
[downloads-image]: http://img.shields.io/npm/dm/glogg.svg
101+
[npm-url]: https://www.npmjs.com/package/glogg
102+
[npm-image]: http://img.shields.io/npm/v/glogg.svg
103+
104+
[travis-url]: https://travis-ci.org/gulpjs/glogg
105+
[travis-image]: http://img.shields.io/travis/gulpjs/glogg.svg?label=travis-ci
106+
107+
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glogg
108+
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glogg.svg?label=appveyor
109+
110+
[coveralls-url]: https://coveralls.io/r/gulpjs/glogg
111+
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/glogg/master.svg
112+
113+
[gitter-url]: https://gitter.im/gulpjs/gulp
114+
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg

appveyor.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# http://www.appveyor.com/docs/appveyor-yml
2+
# http://www.appveyor.com/docs/lang/nodejs-iojs
3+
4+
environment:
5+
matrix:
6+
# node.js
7+
- nodejs_version: "0.10"
8+
- nodejs_version: "0.12"
9+
- nodejs_version: "4"
10+
- nodejs_version: "6"
11+
- nodejs_version: "8"
12+
- nodejs_version: "10"
13+
14+
install:
15+
- ps: Install-Product node $env:nodejs_version
16+
- npm install
17+
18+
test_script:
19+
- node --version
20+
- npm --version
21+
- cmd: npm test
22+
23+
build: off
24+
25+
# build version format
26+
version: "{build}"

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ var levels = [
88
'debug',
99
'info',
1010
'warn',
11-
'error'
11+
'error',
1212
];
1313

1414
function getLogger(namespace) {
1515
var logger = sparkles(namespace);
1616

17-
levels.forEach(function(level){
17+
levels.forEach(function(level) {
1818
logger[level] = makeLogLevel(logger, level);
1919
});
2020

2121
return logger;
2222
}
2323

2424
function makeLogLevel(self, level) {
25-
return function(msg){
25+
return function(msg) {
2626
if (typeof msg === 'string') {
2727
msg = format.apply(null, arguments);
2828
}

package.json

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
"name": "glogg",
33
"version": "1.0.1",
44
"description": "Global logging utility",
5-
"author": "Blaine Bublitz <blaine@iceddev.com> (http://iceddev.com/)",
6-
"contributors": [],
7-
"repository": "js-cli/glogg",
5+
"author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
6+
"contributors": [
7+
"Blaine Bublitz <blaine.bublitz@gmail.com>"
8+
],
9+
"repository": "gulpjs/glogg",
810
"license": "MIT",
911
"engines": {
1012
"node": ">= 0.10"
@@ -17,16 +19,20 @@
1719
"scripts": {
1820
"lint": "eslint .",
1921
"pretest": "npm run lint",
20-
"test": "mocha --async-only"
22+
"test": "mocha --async-only",
23+
"cover": "istanbul cover _mocha --report lcovonly",
24+
"coveralls": "npm run cover && istanbul-coveralls"
2125
},
2226
"dependencies": {
2327
"sparkles": "^1.0.0"
2428
},
2529
"devDependencies": {
26-
"eslint": "^1.7.3",
27-
"eslint-config-gulp": "^2.1.0",
30+
"eslint": "^2.13.0",
31+
"eslint-config-gulp": "^3.0.1",
2832
"expect": "^1.20.2",
29-
"mocha": "^2.5.3"
33+
"istanbul": "^0.4.3",
34+
"istanbul-coveralls": "^1.0.3",
35+
"mocha": "^3.5.3"
3036
},
3137
"keywords": [
3238
"global",

test/.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "gulp/test",
3+
"rules": {
4+
"no-console": 0
5+
}
6+
}

test/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('glogg', function() {
1919
});
2020

2121
it('emits a debug event when debug method is called', function(done) {
22-
logger.on('debug', function(msg){
22+
logger.on('debug', function(msg) {
2323
expect(msg).toEqual('test');
2424
done();
2525
});
@@ -28,7 +28,7 @@ describe('glogg', function() {
2828
});
2929

3030
it('emits a info event when info method is called', function(done) {
31-
logger.on('info', function(msg){
31+
logger.on('info', function(msg) {
3232
expect(msg).toEqual('test');
3333
done();
3434
});
@@ -37,7 +37,7 @@ describe('glogg', function() {
3737
});
3838

3939
it('emits a warn event when warn method is called', function(done) {
40-
logger.on('warn', function(msg){
40+
logger.on('warn', function(msg) {
4141
expect(msg).toEqual('test');
4242
done();
4343
});
@@ -46,7 +46,7 @@ describe('glogg', function() {
4646
});
4747

4848
it('emits a error event when error method is called', function(done) {
49-
logger.on('error', function(msg){
49+
logger.on('error', function(msg) {
5050
expect(msg).toEqual('test');
5151
done();
5252
});
@@ -55,7 +55,7 @@ describe('glogg', function() {
5555
});
5656

5757
it('formats a string message with util.format syntax', function(done) {
58-
logger.on('debug', function(msg){
58+
logger.on('debug', function(msg) {
5959
expect(msg).toEqual('test something');
6060
done();
6161
});
@@ -66,7 +66,7 @@ describe('glogg', function() {
6666
it('does not format a non-string message', function(done) {
6767
var expected = { test: 'something' };
6868

69-
logger.on('debug', function(msg){
69+
logger.on('debug', function(msg) {
7070
expect(msg).toEqual(expected);
7171
done();
7272
});
@@ -77,7 +77,7 @@ describe('glogg', function() {
7777
it('allows you to "destructure" the individual log-level functions', function(done) {
7878
var debug = logger.debug;
7979

80-
logger.on('debug', function(msg){
80+
logger.on('debug', function(msg) {
8181
expect(msg).toEqual('test');
8282
done();
8383
});

0 commit comments

Comments
 (0)