Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

Commit

Permalink
feat: Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
randytarampi committed Mar 11, 2019
0 parents commit c13749e
Show file tree
Hide file tree
Showing 19 changed files with 517 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: "2"
checks:
method-lines:
enabled: true
config:
threshold: 100
method-complexity:
config:
threshold: 10
method-count:
config:
threshold: 25
plugins:
editorconfig:
enabled: false
eslint:
enabled: true
channel: eslint-5
config: .eslintrc.yaml
fixme:
enabled: true
git-legal:
enabled: true
shellcheck:
enabled: true
exclude_patterns:
- "node_modules/"
- "dist/"
- "docs/"
- "test/"
34 changes: 34 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# EditorConfig is awesome: http://EditorConfig.org
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

[*.json]
indent_size = 2

[*.yaml]
indent_size = 2

[*.yml]
indent_size = 2

[*.config]
indent_size = 2

[*.babelrc]
indent_size = 2

[*.nycrc]
indent_size = 2

[**/{node_modules, dist, build, es5, esm, docs, coverage, .nyc_output, .serverless, .webpack, .dynamodb, .idea}/**]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset
12 changes: 12 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
node_modules
dist
build
es5
esm
docs
coverage
.nyc_output
.serverless
.webpack
.dynamodb
.idea
33 changes: 33 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
extends:
- eslint:recommended
rules:
no-useless-escape: 1
eqeqeq: 2
semi: 2
quotes:
- 2
- double
import/named: 2
import/export: 2
import/no-mutable-exports: 2
import/first: 2
import/no-duplicates: 2
import/no-unresolved: 2
import/default: 2
no-global-assign: 2
parserOptions:
ecmaVersion: 6
env:
node: true
es6: true
mocha: true
globals:
Promise: true
plugins:
- import
settings:
import/resolver:
node:
extensions:
- .js
- .json
47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# Project files
*.iml
*.idea

# OS files
.DS_Store

# Test files
test/tmp
39 changes: 39 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"extension": [
".jsx"
],
"exclude": [
"node_modules/**",
"coverage/**",
".nyc_output/**",
"test/**",
"*.js"
],
"reporter": [
"text-summary",
"lcov"
],
"cache": true,
"all": true,
"check-coverage": true,
"sourceMap": true,
"instrument": true,
"watermarks": {
"lines": [
70,
90
],
"functions": [
70,
90
],
"branches": [
70,
90
],
"statements": [
70,
90
]
}
}
12 changes: 12 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- "@semantic-release/changelog"
- "@semantic-release/npm"
- - "@semantic-release/git"
- assets:
- package.json
- package-lock.json
- CHANGELOG.md
message: "release(travis): Release ${nextRelease.version}\n\n[skip ci]\n\n${nextRelease.notes}"
- "@semantic-release/github"
33 changes: 33 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
language: node_js
notifications:
email: false
dist: xenial
node_js:
- 8
- 6
- 10
- node
before_script:
- npm run pretest
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter && chmod +x ./cc-test-reporter && ./cc-test-reporter before-build
script: npm run cover
after_script:
- npm run coveralls
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT;
before_deploy:
- git config --local user.name "$TRAVIS_AUTHOR_NAME"
- git config --local user.email "$TRAVIS_AUTHOR_EMAIL"
deploy:
provider: script
script: npx semantic-release
skip_cleanup: true
on:
branch: master
node: 8
os: linux
sudo: false
env:
global:
- secure: i967hEPDGCztc3HJifQdNqAPHXyeF8qCNIYCtoYLeK1egyLdFNuhSkwTAeeCCrr0DpUn/p8FB4cKsIQ1rKH0hxy1oGOgjdaMmKiC8N6Lh1ikXCY3sErWcmmM122u3gPey5wwjfUt+dNC+Y/G1sG5v2zL1h+Hsard5cCVU5n2J+XiQImekd9ZlCLacdeYkd4LkVW7t4/N9i9ZSDQNQhzsObvG65hzd1d4+TrAtVFPYW+YkSc8QO96vAsQv90B8ghP5gX+iEQcmyIYwkhmThEF2rsQQAFkzkxGteFWht8cV68nnlpI4VIai/xFRWIoYoNczv3apFSC5jqx0lzIGIBnCYPgSpUQIG/0sP3Z0X89i/p5pFO2u5tVlHRwo2Gp2b4Ga3Ulx78kKGUj7s175tFxcbRQHFugK99/oeC33aAgCt3Pb9pggpS8AjjJ0VD5ii5XpLZMoubZeuaCDCIASI1ENzjhVJtOuMHqSUx6PY3XnZcpx9wxTVG+YjiFaRPPZkwCgTQXYU8N0Ny/52OMO5YykSDbQxfiUPwzQHgtDBgG4Pw2VDtK7WtAaU/UjpSTdDmYOGV05mkd6W5uhl99Uu6ru31aSNttGHm+HBnu6wZZcXtf6+OFn4Cf0gTAKL/0/dNsIrTLu1/H9TZYhFRULicCm/9Oo9qfZfcVYVON2LQqwBk=
- secure: LfVVkDA+iV5e1pfgBGsRa+JZCkTKWNQmTUR8ZOIwMvLo4zGnA0K4k3mFRUxNnp3zgwcu3GSAx39mu/rMXWok6TLWgVnx4PmBWfuqy9u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ymw1Y8pLQggdjAxoGXfvRU8Y9gD3l1JnuWOmTWQMcFxyGfgBGx/CoeoiKNwKrpZrPeBu1c4J1TVlD44l44vxNNlUms9avjWBVnwDnzK85loZE+mQrA9MXF4vp0cWdoGRM8KSfolJO75YwrG0WV8J+t1FFfCI7/N4j3AwPZ1JFfA9CjGHs1cnaILOJzSHbAY/7l/o=
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Randy Tarampi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Empty file added README.md
Empty file.
37 changes: 37 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const gulp = require("gulp");

function isFixed (file) {
return file.eslint && file.eslint.fixed;
}

gulp.task("eslint", () => {
const path = require("path");
const eslint = require("gulp-eslint");
const gulpIf = require("gulp-if");

return gulp.src(["**/*.js"])
.pipe(eslint({ fix: true, ignorePath: path.join(__dirname, ".eslintignore") }))
.pipe(eslint.format())
.pipe(gulpIf(isFixed, gulp.dest("./")))
.pipe(eslint.failAfterError());
});

gulp.task("lint", gulp.parallel(["eslint"]));

gulp.task("test.unit", () => {
const mocha = require("gulp-mocha");
const mochaConfig = require("./mocha.config");

return gulp.src("test/unit/**/*.js", { read: false })
.pipe(mocha(mochaConfig));
});

gulp.task("test.integration", () => {
const mocha = require("gulp-mocha");
const mochaConfig = require("./mocha.config");

return gulp.src("test/integration/**/*.js", { read: false })
.pipe(mocha(mochaConfig));
});

gulp.task("test", gulp.parallel(["test.unit", "test.integration"]));
7 changes: 7 additions & 0 deletions mocha.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
globals: ["expect"],
sort: true,
fullTrace: true,
checkLeaks: true,
exit: true,
};
Loading

0 comments on commit c13749e

Please sign in to comment.