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
Showing
32 changed files
with
5,393 additions
and
4,771 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"root": true, | ||
"plugins": ["homer0"], | ||
"extends": ["plugin:homer0/node"] | ||
"plugins": ["@homer0"], | ||
"extends": [ | ||
"plugin:@homer0/node-with-prettier", | ||
"plugin:@homer0/jsdoc" | ||
] | ||
} |
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,34 @@ | ||
name: Release NPM package | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Read .nvmrc | ||
run: echo "::set-output name=NVMRC::$(cat .nvmrc)" | ||
id: nvm | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '${{ steps.nvm.outputs.NVMRC }}' | ||
- name: Install dependencies | ||
env: | ||
HUSKY: 0 | ||
run: yarn --frozen-lockfile | ||
- run: yarn semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Generate documentation | ||
run: yarn docs | ||
- name: Deploy documentation | ||
uses: JamesIves/github-pages-deploy-action@4.1.1 | ||
with: | ||
BRANCH: gh-pages | ||
FOLDER: docs |
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,24 @@ | ||
name: Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [ '14', '16' ] | ||
name: Run jest and ESLint (Node ${{ matrix.node }}) | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- run: yarn --frozen-lockfile | ||
- run: yarn lint:all | ||
- run: yarn test | ||
- name: Coveralls | ||
if: ${{ matrix.node == '14' }} | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
|
@@ -5,3 +5,4 @@ npm-debug.log | |
yarn-error.log | ||
dist | ||
docs/ | ||
.vscode |
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,9 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
if hash yarn 2>/dev/null; then | ||
yarn commitlint --edit $1 | ||
else | ||
npx commitlint --edit $1 | ||
fi | ||
|
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
#!/bin/bash -ex | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
if hash yarn 2>/dev/null; then | ||
yarn | ||
else | ||
npm install | ||
fi | ||
|
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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
#!/bin/bash -e | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
if hash yarn 2>/dev/null; then | ||
yarn run lint | ||
yarn test | ||
else | ||
npm run lint | ||
npm test | ||
fi |
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,8 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
if hash yarn 2>/dev/null; then | ||
yarn test | ||
else | ||
npm test | ||
fi |
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,7 @@ | ||
module.exports = { | ||
automock: true, | ||
collectCoverage: true, | ||
testPathIgnorePatterns: ['/node_modules/', '/utils/scripts/'], | ||
unmockedModulePathPatterns: ['/node_modules/', '/mocks/'], | ||
testEnvironment: 'node', | ||
}; |
This file was deleted.
Oops, something went wrong.
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,46 @@ | ||
const packageJson = require('./package.json'); | ||
|
||
module.exports = { | ||
source: { | ||
include: ['./src'], | ||
includePattern: '.js$', | ||
}, | ||
plugins: ['docdash/nativeTypesPlugin', 'jsdoc-ts-utils', 'plugins/markdown'], | ||
templates: { | ||
cleverLinks: true, | ||
default: { | ||
includeDate: false, | ||
}, | ||
}, | ||
opts: { | ||
recurse: true, | ||
destination: './docs', | ||
readme: 'README.md', | ||
template: 'node_modules/docdash', | ||
}, | ||
docdash: { | ||
title: packageJson.name, | ||
meta: { | ||
title: `${packageJson.name} docs`, | ||
}, | ||
sectionOrder: [], | ||
collapse: true, | ||
refLinks: [ | ||
{ | ||
title: 'View the package on Yarn', | ||
url: `https://yarnpkg.com/package/${packageJson.name}`, | ||
type: 'yarn', | ||
}, | ||
{ | ||
title: 'Go to the GitHub repository', | ||
url: `https://github.com/${packageJson.repository}`, | ||
type: 'github', | ||
}, | ||
{ | ||
title: 'View the package on NPM', | ||
url: `https://www.npmjs.com/package/${packageJson.name}`, | ||
type: 'npm', | ||
}, | ||
], | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1 +1 @@ | ||
10 | ||
14 |
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 @@ | ||
"@homer0/prettier-config" |
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,12 @@ | ||
{ | ||
"tagFormat": "${version}", | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/changelog", | ||
"@semantic-release/npm", | ||
"@semantic-release/git", | ||
"@semantic-release/github" | ||
], | ||
"branches": ["main"] | ||
} |
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.