Skip to content

Commit

Permalink
Merge branch 'es6_with_di'
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmark committed Sep 19, 2016
2 parents a1e7089 + c427afc commit 974747b
Show file tree
Hide file tree
Showing 54 changed files with 2,672 additions and 746 deletions.
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["es2015"],
"comments": true,
}
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This automatically sources the venv when we cd into the project
# (assuming https://github.com/kennethreitz/autoenv/ is installed)

source venv/bin/activate
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage
dist
30 changes: 30 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
'use strict';

module.exports = {
"extends": [
"airbnb",
],
"env": {
"node": true,
"es6": true,
},
"rules": {
"comma-dangle": ["error", "always-multiline"],
"indent": ["error", 4],

// Allow private identifiers
"no-underscore-dangle": 0,

// Add Lentil API to whitelist
"new-cap": ["error", {
"capIsNewExceptions": [
"LentilDep.Lentil",
"LentilDep.Regular",
"LentilDep.Provided",
]
}],

// TODO: reenable this rule
"class-methods-use-this": 0,
}
};
35 changes: 10 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,12 @@
node_modules
.DS_Store
.AppleDouble
.LSOverride
config.json

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
.nyc_output
*.swp
build
config.json
coverage
dist
jsdoc
node_modules
npm-debug.log
venv
14 changes: 14 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.babelrc
.env
.eslintignore
.eslintrc.js
.nyc_output
.pre-commit-config.yaml
.swp
.travis.yml
Makefile
coverage
npm-debug.log
requirements-dev.txt
tests
venv
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
- repo: git://github.com/pre-commit/pre-commit-hooks
sha: 18d7035de5388cc7775be57f529c154bf541aab9
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-json
- id: check-merge-conflict
- repo: git://github.com/pre-commit/mirrors-eslint
sha: v3.5.0
hooks:
- id: eslint
additional_dependencies:
- eslint
- eslint-config-airbnb
- eslint-plugin-jsx-a11y
- eslint-plugin-react
- eslint-plugin-import
- repo: git://github.com/magicmark/pre-commit-es6-imports-reorder
sha: 9ca7b2274eef5355d550b6cb7e2cd5e9ee518d2f
hooks:
- id: reorder-es6-imports
23 changes: 23 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
sudo: false
language: python
python:
- "3.5"
install:
- nvm install 6
env:
global:
- COVERALLS_SERVICE_NAME=travis-ci
- COVERALLS_REPO_TOKEN=MUPeiBPH7d1yj7tt2yt3VNkkllD40Q9b3
script:
- make test
- make coveralls
deploy:
provider: npm
email: mark@larah.me
skip_cleanup: true
api_key:
secure: lp2fnozrTICW/Z55ecZlSh3KN0WhIIjLbj6llhlaMFrGNB7EIAuDBLrnoyohGQ5lJkRlZE+C8EoIkiSmXVVG+8vI0PHe3m1sTWTFHfUGAHNruRxapzfPhKd3h19+IJoPmTQwJYR7F09yj0gIMNzUIc+fjSUiCVW9V6LIXs30cXrp/iTSKJ68P2ihEfDB3iVID+uUIv/9DjFmbsezXcQTyCptzZ6kjYV19fyx/rSp76J/nPTQIB19wag7U06y6BRYeOOAF1kDnUKeuZ37hXKRFo0cQwxBpG9kj/ovpHY56+PrRYLLtsOYqW8tYpK7HMTtSh3SZ7Aw6BYR6jMA99cau9f+zvIH7R1lgPBfEwHjauFS7rNZ/sUaLU1M9Yd0YTY5A5wbV0DHBJjhzrXR3BWfHrTi66f0/uuDl+yAp/Ro0hbMRsxuEPLeNz7Z0J0pO/zUxhX7bHCMKL2Ik/QbXj5z5ye/KxLD3ZytNjsONlHGREW7IUQKwrL/waIHqPeJBPujO0Z9xQczKT9kNiLFUM4/yG+szdMM2mgd2wyHUZDWZVAxnruRFFb5BQn5kfcqXqBK1eArnwutR2yarV7WIuSf7E3mkTBOjhq89HjUrbRb1pIwpSpaWQsMmlncabrR2Y7CgPtYfrk0eAwfw8j4bJg+0UQthgcORaj7aFc8NIMTJos=
on:
branch: master
tags: true
repo: magicmark/wafflebot
45 changes: 45 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
all: test

venv: Makefile requirements-dev.txt
rm -rf venv
virtualenv venv --python=python3
venv/bin/pip install -r requirements-dev.txt
venv/bin/pre-commit install -f --install-hooks

.PHONY: test
test: venv build
# Run unit tests + coverage
npm test
# Run pre-commit hooks
venv/bin/pre-commit run --all-files

start: dist
npm start

build: node_modules
./node_modules/.bin/babel -d dist src --no-comments
cp src/*.json dist/

node_modules:
npm install

coveralls: coverage node_modules
cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

.PHONY: jsdoc
jsdoc: node_modules
./node_modules/.bin/jsdoc LentilDI/lib/lentil.js -c .jsdoc.json -r -d jsdoc

eslint: node_modules
node_modules/.bin/eslint .

eslint-fix: node_modules
node_modules/.bin/eslint --fix .

clean:
rm -rf dist
rm -rf coverage
rm -rf .nyc_output
rm -rf jsdoc
rm -rf node_modules
rm -rf venv
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Create a `config.json` file with the following sample content
}
```

Note: Wafflebot uses [nodemailer](https://github.com/nodemailer/nodemailer) for sending emails - see their documentation for info about the `mail_transport_string`
Note: Wafflebot uses [nodemailer](https://github.com/nodemailer/nodemailer) for sending emails - see their documentation for info about the `mail_transport_string`

You can then run wafflebot by running
```bash
Expand Down
157 changes: 0 additions & 157 deletions actionhandler.js

This file was deleted.

7 changes: 7 additions & 0 deletions bin/wafflebot
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env node
'use strict';

var Wafflebot = require('./../dist/wafflebot.js').default;

var wafflebot = new Wafflebot();
wafflebot.start();
Loading

0 comments on commit 974747b

Please sign in to comment.