Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

refactor: pob and update dependencies

  • Loading branch information...
christophehurpeau committed Oct 26, 2016
1 parent ad77912 commit fb7839aed9ace717bfa983cbfe2ebeab2b1533de
Showing with 382 additions and 158 deletions.
  1. +0 −1 .babelrc
  2. +1 −0 .commitrc.js
  3. +17 −0 .editorconfig
  4. +0 −1 .eslintignore
  5. +2 −0 .eslintignore
  6. +0 −3 .eslintrc
  7. +1 −0 .eslintrc.js
  8. +2 −6 .gitignore
  9. +0 −1 .npmignore
  10. +26 −0 .npmignore
  11. +8 −0 .pob.json
  12. +0 −1 Makefile
  13. +20 −2 README.md
  14. +28 −0 README.md.back
  15. +5 −0 git-hooks/post-checkout
  16. +5 −0 git-hooks/post-merge
  17. +45 −0 git-hooks/pre-commit
  18. +11 −0 git-hooks/prepare-commit-msg
  19. +2 −0 index.js
  20. +67 −0 lib-node6-dev/index.js
  21. +1 −0 lib-node6-dev/index.js.map
  22. +67 −0 lib-node6/index.js
  23. +1 −0 lib-node6/index.js.map
  24. +0 −78 lib/index.js
  25. +0 −1 lib/index.js.map
  26. +28 −17 package.json
  27. +45 −47 src/index.js

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1 @@
module.exports = ['karma'];
@@ -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

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,2 @@
!**/*.{js,jsx}
**/*.min.{js,jsx}

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1 @@
exports.extends = 'pob/babel';
@@ -1,14 +1,13 @@
node_modules
/docs
/dist
/coverage
/build
node_modules

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

#*
*$
@@ -18,6 +17,3 @@ node_modules
*.old
*~
.#*
.*.swp
.DS_Store
,*

This file was deleted.

Oops, something went wrong.
@@ -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
*~
.#*
@@ -0,0 +1,8 @@
{
"envs": [
"node6"
],
"react": false,
"documentation": false,
"testing": false
}

This file was deleted.

Oops, something went wrong.
@@ -1,6 +1,17 @@
# alp-listen
# alp-listen [![NPM version][npm-image]][npm-url]

Handles http and https via config
Listen function, using config and logger for alp server

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

## Install

```sh
npm install --save alp-listen
```

## Usage

```js
import Koa from 'koa';
@@ -26,3 +37,10 @@ config:

If `tls` is true, the files `server.key` and `server.crt`
will be loaded from the path given in the first param

[npm-image]: https://img.shields.io/npm/v/alp-listen.svg?style=flat-square
[npm-url]: https://npmjs.org/package/alp-listen
[daviddm-image]: https://david-dm.org/alpjs/alp-listen.svg?style=flat-square
[daviddm-url]: https://david-dm.org/alpjs/alp-listen
[dependencyci-image]: https://dependencyci.com/github/alpjs/alp-listen/badge?style=flat-square
[dependencyci-url]: https://dependencyci.com/github/alpjs/alp-listen
@@ -0,0 +1,28 @@
# alp-listen

Handles http and https via config

```js
import Koa from 'koa';
import config from 'alp-config';
import errors from 'alp-errors';
import logger from 'alp-logger';
import listen from 'alp-listen';

const app = new Koa();
config(`${__dirname}/config`, { packageConfig })(app);
logger(app);

app.use(errors);

listen(`${__dirname}/../cert/`)(app).then((server) => {
console.log('Listening !');
});
```

config:
- `socketPath` OR `port` (+ `hostname`)
- `tls`: boolean

If `tls` is true, the files `server.key` and `server.crt`
will be loaded from the path given in the first param
@@ -0,0 +1,5 @@
#!/bin/bash

if [[ `git diff HEAD@{1} --stat -- package.json` != "" ]]; then
npm install ; npm prune
fi
@@ -0,0 +1,5 @@
#!/bin/bash

if [[ `git diff HEAD@{1} --stat -- package.json` != "" ]]; then
npm install ; npm prune
fi
@@ -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
@@ -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
@@ -0,0 +1,2 @@
var production = process.env.NODE_ENV === 'production';
module.exports = require('./lib-node6' + (production ? '' : '-dev') + '/');

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit fb7839a

Please sign in to comment.
You can’t perform that action at this time.