-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 47948ab
Showing
23 changed files
with
1,326 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
exclude_patterns: | ||
- doc/** | ||
- dist/** | ||
- test/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: ['@js-library'] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run precommit |
Oops, something went wrong.