Skip to content

Commit 2f4f6e1

Browse files
author
Raphaël Benitte
committed
chore(init): init repo
0 parents  commit 2f4f6e1

12 files changed

+4566
-0
lines changed

.changelogrc

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"app_name": "@ekino/logger",
3+
"intro": "@ekino/logger is a lightweight logger that combines debug namespacing capabilities with winston levels and multioutput",
4+
"file": "CHANGELOG.md",
5+
"sections": [
6+
{
7+
"title": "Bug Fixes",
8+
"grep": "^fix"
9+
},
10+
{
11+
"title": "Features",
12+
"grep": "^feat"
13+
},
14+
{
15+
"title": "Documentation",
16+
"grep": "^docs"
17+
},
18+
{
19+
"title": "Breaking changes",
20+
"grep": "BREAKING"
21+
},
22+
{
23+
"title": "Refactor",
24+
"grep": "^refactor"
25+
},
26+
{
27+
"title": "Style",
28+
"grep": "^style"
29+
},
30+
{
31+
"title": "Test",
32+
"grep": "^test"
33+
},
34+
{
35+
"title": "Chore",
36+
"grep": "^chore"
37+
},
38+
{
39+
"title": "Branchs merged",
40+
"grep": "^Merge branch"
41+
},
42+
{
43+
"title" : "Pull requests merged",
44+
"grep": "^Merge pull request"
45+
}
46+
]
47+
}

.eslintrc.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
parserOptions:
2+
ecmaVersion: 2017
3+
sourceType: script
4+
env:
5+
node: true
6+
es6: true
7+
extends: eslint:recommended
8+
rules:
9+
no-unused-vars: off

.gitignore

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# Directory for instrumented libs generated by jscoverage/JSCover
12+
lib-cov
13+
14+
# Coverage directory used by tools like istanbul
15+
coverage
16+
17+
# nyc test coverage
18+
.nyc_output
19+
20+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21+
.grunt
22+
23+
# node-waf configuration
24+
.lock-wscript
25+
26+
# Compiled binary addons (http://nodejs.org/api/addons.html)
27+
build/Release
28+
29+
# Dependency directories
30+
node_modules
31+
jspm_packages
32+
33+
# Optional npm cache directory
34+
.npm
35+
36+
# Optional REPL history
37+
.node_repl_history
38+
39+
.idea

.npmignore

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Logs
2+
*.log
3+
npm-debug.log*
4+
5+
# CI
6+
.travis.yml
7+
8+
# Coverage directory used by tools like istanbul
9+
coverage
10+
11+
# nyc test coverage
12+
.nyc_output
13+
14+
# Dependency directories
15+
node_modules
16+
17+
# Optional npm cache directory
18+
.npm
19+
20+
# tests
21+
/test
22+
23+
# IDE
24+
.idea
25+
26+
# misc
27+
Makefile
28+
.eslintrc.yml
29+
.gitignore
30+
.changelogrc

.travis.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
language: node_js
2+
node_js:
3+
- '6'
4+
- '7'
5+
- '8'
6+
script:
7+
- yarn run lint
8+
- yarn run check-fmt
9+
- yarn run test-cover
10+
after_success:
11+
- yarn run coverage
12+
notifications:
13+
flowdock: $FLOWDOCK_API_TOKEN

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 ekino
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
.DEFAULT_GOAL := help
2+
3+
############## Vars that shouldn't be edited ##############
4+
NODE_MODULES ?= "./node_modules"
5+
NODE_MODULES_BIN ?= "${NODE_MODULES}/.bin"
6+
7+
FROM_VERSION ?= $(shell yarn run -s version)
8+
9+
############## HELP ##############
10+
11+
#COLORS
12+
RED := $(shell tput -Txterm setaf 1)
13+
GREEN := $(shell tput -Txterm setaf 2)
14+
WHITE := $(shell tput -Txterm setaf 7)
15+
YELLOW := $(shell tput -Txterm setaf 3)
16+
RESET := $(shell tput -Txterm sgr0)
17+
18+
# Add the following 'help' target to your Makefile
19+
# And add help text after each target name starting with '\#\#'
20+
# A category can be added with @category
21+
HELP_HELPER = \
22+
%help; \
23+
while(<>) { push @{$$help{$$2 // 'options'}}, [$$1, $$3] if /^([a-zA-Z\-\%]+)\s*:.*\#\#(?:@([a-zA-Z\-\%]+))?\s(.*)$$/ }; \
24+
print "usage: make [target]\n\n"; \
25+
for (sort keys %help) { \
26+
print "${WHITE}$$_:${RESET}\n"; \
27+
for (@{$$help{$$_}}) { \
28+
$$sep = " " x (32 - length $$_->[0]); \
29+
print " ${YELLOW}$$_->[0]${RESET}$$sep${GREEN}$$_->[1]${RESET}\n"; \
30+
}; \
31+
print "\n"; }
32+
33+
help: ##prints help
34+
@perl -e '$(HELP_HELPER)' $(MAKEFILE_LIST)
35+
36+
############## RELEASE ##############
37+
changelog: ##@release create changelog
38+
@echo "${YELLOW}generating changelog from v${FROM} to v${RELEASE_VERSION}${RESET}"
39+
ifeq ($(FROM), false)
40+
@yarn run changelog -- -t false
41+
else
42+
@yarn run changelog -- -t "v${FROM}"
43+
endif
44+
45+
update-package-version: ##@release updates version in package.json
46+
@echo "${YELLOW}updating package.json version to ${RELEASE_VERSION}${RESET}"
47+
@npm version --no-git-tag-version "${RELEASE_VERSION}"
48+
49+
release: ##@release generates a new release
50+
@echo "${YELLOW}building release ${RELEASE_VERSION} from ${FROM_VERSION}${RESET}"
51+
@-git stash
52+
@make update-package-version
53+
@make changelog FROM=${FROM_VERSION}
54+
@git add package.json CHANGELOG.md
55+
@git commit -m "chore(v${RELEASE_VERSION}): bump version to ${RELEASE_VERSION}"
56+
@git tag -a "v${RELEASE_VERSION}" -m "version ${RELEASE_VERSION}"
57+
@git push origin v${RELEASE_VERSION}

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# @ekino/logger
2+
3+
[![NPM version][npm-image]][npm-url]
4+
[![Travis CI][travis-image]][travis-url]
5+
[![Coverage Status][coverage-image]][coverage-url]
6+
[![styled with prettier][prettier-image]][prettier-url]
7+
8+
A Lightweight logger that combines debug namespacing capabilities with winston levels and multioutput
9+
10+
[npm-image]: https://img.shields.io/npm/v/@ekino/logger.svg?style=flat-square
11+
[npm-url]: https://www.npmjs.com/package/@ekino/logger
12+
[travis-image]: https://img.shields.io/travis/ekino/node-logger.svg?style=flat-square
13+
[travis-url]: https://travis-ci.org/ekino/node-logger
14+
[prettier-image]: https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=flat-square
15+
[prettier-url]: https://github.com/prettier/prettier
16+
[coverage-image]: https://img.shields.io/coveralls/ekino/node-logger/master.svg?style=flat-square
17+
[coverage-url]: https://coveralls.io/github/ekino/node-logger?branch=master
18+

0 commit comments

Comments
 (0)