Skip to content
This repository has been archived by the owner on Mar 11, 2018. It is now read-only.

Commit

Permalink
refactor: nightingale v2
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed Oct 16, 2016
1 parent 68838f1 commit 79bd6e7
Show file tree
Hide file tree
Showing 35 changed files with 380 additions and 159 deletions.
1 change: 0 additions & 1 deletion .babelrc

This file was deleted.

1 change: 1 addition & 0 deletions .commitrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = ['karma'];
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# Tab indentation (no size specified)
[Makefile, *.mk]
indent_style = tab
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
!**/*.{js,jsx}
**/*.min.{js,jsx}
3 changes: 0 additions & 3 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
exports.extends = 'pob/babel';
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
node_modules
/docs
/dist
/coverage
/build
node_modules

/.settings
/.project
/.idea
*.sublime-project
*.sublime-workspace
/.idea

#*
*$
Expand All @@ -18,6 +17,3 @@ node_modules
*.old
*~
.#*
.*.swp
.DS_Store
,*
1 change: 0 additions & 1 deletion .npmignore

This file was deleted.

26 changes: 26 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/git-hooks
/examples
/samples
/docs
/coverage
/build
/test
/.pob.json
circle.yml
.codeclimate.yml
jsdoc.config.json

/.settings
/.project
/.idea
*.sublime-project
*.sublime-workspace

#*
*$
*.BAK
*.bak
*.log
*.old
*~
.#*
10 changes: 10 additions & 0 deletions .pob.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"envs": [
"webpack-modern-browsers",
"webpack",
"browsers"
],
"react": false,
"documentation": false,
"testing": false
}
15 changes: 15 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Copyright (c) 2016 Christophe Hurpeau <christophe@hurpeau.com> (http://christophe.hurpeau.com/)

Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all
copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
2 changes: 0 additions & 2 deletions Makefile

This file was deleted.

24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# nightingale-browser-console [![NPM version][npm-image]][npm-url]

Browser console handler for nightingale

[![Dependency Status][daviddm-image]][daviddm-url]

## Install

```sh
npm install --save nightingale-browser-console
```

## Usage

```js
import nightingaleBrowserConsole from 'nightingale-browser-console';

console.log(nightingaleBrowserConsole);
```

[npm-image]: https://img.shields.io/npm/v/nightingale-browser-console.svg?style=flat-square
[npm-url]: https://npmjs.org/package/nightingale-browser-console
[daviddm-image]: https://david-dm.org/nightingalejs/nightingale-browser-console.svg?style=flat-square
[daviddm-url]: https://david-dm.org/nightingalejs/nightingale-browser-console
75 changes: 0 additions & 75 deletions browser/lib/index.js

This file was deleted.

1 change: 0 additions & 1 deletion browser/lib/index.js.map

This file was deleted.

5 changes: 5 additions & 0 deletions git-hooks/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

if [[ `git diff HEAD@{1} --stat -- package.json` != "" ]]; then
npm install ; npm prune
fi
5 changes: 5 additions & 0 deletions git-hooks/post-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

if [[ `git diff HEAD@{1} --stat -- package.json` != "" ]]; then
npm install ; npm prune
fi
45 changes: 45 additions & 0 deletions git-hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/sh

if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi

# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --bool hooks.allownonascii)

# Redirect output to stderr.
exec 1>&2

# Cross platform projects tend to avoid non-ASCII filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
if [ "$allownonascii" != "true" ] &&
# Note that the use of brackets around a tr range is ok here, (it's
# even required, for portability to Solaris 10's /usr/bin/tr), since
# the square bracket bytes happen to fall in the designated range.
test $(git diff --cached --name-only --diff-filter=A -z $against |
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
cat <<\EOF
Error: Attempt to add a non-ASCII file name.
This can cause problems if you want to work with people on other platforms.
To be portable it is advisable to rename the file.
If you know what you are doing you can disable this check using:
git config hooks.allownonascii true
EOF
exit 1
fi

# If there are whitespace errors, print the offending file names and fail.
git diff-index --check --cached $against -- || exit 1

echo 'Lint check'
npm run lint || exit 1
11 changes: 11 additions & 0 deletions git-hooks/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

# Allow to read user input, assigns stdin to keyboard
exec < /dev/tty

case "$2," in
message,|template,|,)
node_modules/.bin/prepare-commit-msg --path "$1"
;;
*) ;;
esac
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
var production = process.env.NODE_ENV === 'production';
throw new Error('Platform not supported: ' + process.version + '.');
52 changes: 52 additions & 0 deletions lib-browsers-dev/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib-browsers-dev/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions lib-browsers/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib-browsers/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 79bd6e7

Please sign in to comment.