Skip to content

Commit

Permalink
🤖 chore: Setup repository.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed May 24, 2021
0 parents commit 47948ab
Show file tree
Hide file tree
Showing 23 changed files with 1,326 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
exclude_patterns:
- doc/**
- dist/**
- test/**
3 changes: 3 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@js-library']
};
55 changes: 55 additions & 0 deletions .esdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"source": "./src",
"destination": "./gh-pages",
"debug": false,
"index": "./README.md",
"package": "./package.json",
"plugins": [
{
"name": "esdoc-standard-plugin",
"option": {
"accessor": {
"access": [
"public",
"protected",
"private"
],
"autoPrivate": true
},
"brand": {
"title": "@edit-distance/myers-1986"
},
"test": {
"type": "ava",
"source": "./test/src"
},
"manual": {
"files": [
"./doc/manual/overview.md",
"./doc/manual/installation.md",
"./doc/manual/usage.md",
"./doc/manual/example.md"
]
}
}
},
{
"name": "esdoc-inject-style-plugin",
"option": {
"enable": true,
"styles": [
"./doc/css/style.css"
]
}
},
{
"name": "esdoc-inject-script-plugin",
"option": {
"enable": true,
"scripts": [
"./doc/scripts/header.js"
]
}
}
]
}
73 changes: 73 additions & 0 deletions .fixpackrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"files": [
"package.json"
],
"quiet": false,
"required": [
"name",
"version"
],
"requiredOnPrivate": [],
"sortToTop": [
"name",
"description",
"version",
"license",
"author",
"homepage",
"repository",
"bugs",
"keywords",
"sideEffects",
"type",
"source",
"main",
"module",
"esmodule",
"umd:main",
"unpkg",
"exports",
"files",
"scripts",
"bundledDependencies",
"dependencies",
"optionalDependencies",
"peerDependencies",
"peerDependenciesMeta",
"devDependencies"
],
"sortedSubItems": [
"keywords",
"exports",
"files",
"scripts",
"bundledDependencies",
"dependencies",
"optionalDependencies",
"peerDependencies",
"peerDependenciesMeta",
"devDependencies"
],
"warn": [
"description",
"author",
"repository",
"keywords",
"main",
"bugs",
"homepage",
"license",
"files"
],
"warnOnPrivate": [
"name",
"version",
"description",
"main"
],
"dryRun": false,
"wipe": false,
"indent": null,
"newLine": null,
"finalNewLine": null
}
25 changes: 25 additions & 0 deletions .github/workflows/ci:test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: ci:test
on:
- push
- pull_request
jobs:
test:
name: Continuous integration (tests)
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2

- name: Install 🔧
uses: bahmutov/npm-install@v1
with:
install-command: yarn --frozen-lockfile --ignore-scripts
useRollingCache: true

- name: Test 🔬
run: yarn ci:test

- name: Publish coverage report 📃
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
23 changes: 23 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build and Deploy GitHub pages
on:
release:
types:
- created
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2

- name: Install 🔧
run: npm install

- name: Build 🏗️
run: npm run build-gh-pages

- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: gh-pages
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# lock file
!yarn.lock

# Generated files
/dist

# Dependency directory
node_modules
jspm_packages

# Coverage directory used by nyc
/coverage
/.nyc_output

# Documentation
/gh-pages
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
52 changes: 52 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

function ask () {

# This is a general-purpose function to ask Yes/No questions in Bash, either
# with or without a default answer. It keeps repeating the question until it
# gets a valid answer.

# http://djm.me/ask

if [ "${2:-}" = "Y" ]; then
prompt="Y/n"
default=Y
elif [ "${2:-}" = "N" ]; then
prompt="y/N"
default=N
else
prompt="y/n"
default=
fi

while true; do

# Ask the question (not using "read -p" as it uses stderr not stdout)
echo -n "$1 [$prompt] "

# Read the answer (use /dev/tty in case stdin is redirected from somewhere else)
read REPLY </dev/tty

# Default?
if [ -z "$REPLY" ]; then
REPLY=$default
fi

# Check if the reply is valid
case "$REPLY" in
Y*|y*) return 0 ;;
N*|n*) return 1 ;;
esac

done

}

while ! npm run commit-msg -- "$1" ; do
if [ -t 1 ] && ask 'There was an error. Do you wish to amend your commit message?' Y ; then
${GIT_EDITOR:-$EDITOR} "$1" < /dev/tty
else
exit 1
fi
done
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run precommit
Loading

0 comments on commit 47948ab

Please sign in to comment.