Skip to content

Commit

Permalink
feat: Use repo template (@sebbo2002/js-template)
Browse files Browse the repository at this point in the history
Merge branch 'typescript' of github.com:sebbo2002/js-template into develop

# Conflicts:
#	.dockerignore
#	.eslintignore
#	.github/workflows/release-bot.yml
#	.gitignore
#	.mocharc.yml
#	.nycrc
#	CHANGELOG.md
#	Dockerfile
#	LICENSE
#	README.md
#	package-lock.json
#	package.json
#	release.config.js
#	tsconfig.json
#	typedoc.json
  • Loading branch information
sebbo2002 committed May 13, 2021
2 parents f4bf028 + d650d9e commit 696a474
Show file tree
Hide file tree
Showing 55 changed files with 13,041 additions and 1,606 deletions.
10 changes: 6 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/.nyc_output
/examples
/node_modules
.github
.nyc_output
dist
docs
node_modules
/src
/test-result
test
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_size = 2
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules/**
dist/**
coverage/**
docs/**
6 changes: 2 additions & 4 deletions .eslintrc.json → .eslintrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"env": {
"node": true,
"commonjs": true,
"es6": true,
"mocha": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
Expand All @@ -16,7 +14,7 @@
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018
"ecmaVersion": 2020
},
"plugins": [
"@typescript-eslint"
Expand Down Expand Up @@ -44,7 +42,7 @@
},
{
"files": [
"lib/device-events.ts"
"src/lib/device-events.ts"
],
"rules": {
"@typescript-eslint/ban-ts-comment": "off"
Expand Down
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
### About this Pull Request
- **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)
-
- **What is the current behavior?** (You can also link to an open issue here)
-
- **What is the new behavior (if this is a feature change)?**
-
- **Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?)
-
- **Other information**:
-


### Pull Request Checklist

- [ ] My code follows the code style of this project
- Run `npm run lint` to double check
- [ ] My change requires a change to the documentation
- [ ] I have updated the documentation accordingly
- [ ] I have added tests to cover my changes
- Run `npm run test` to run the unit tests and `npm run coverage` to generate a coverage report
- [ ] All new and existing tests passed
- [ ] My commit messages follow the [commit guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit)
30 changes: 30 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
assignees:
- sebbo2002
commit-message:
prefix: "ci"
include: scope
schedule:
interval: weekly
- package-ecosystem: npm
directory: /
assignees:
- sebbo2002
commit-message:
prefix: "build"
prefix-development: "chore"
include: scope
schedule:
interval: daily
- package-ecosystem: docker
directory: /
assignees:
- sebbo2002
commit-message:
prefix: "build"
schedule:
interval: weekly

32 changes: 32 additions & 0 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -e

echo "########################"
echo "# build.sh"
echo "# Branch = ${BRANCH}"
echo "# npm version = $(npm -v)"
echo "########################"

# Typescript Build in ./dist
npm run build

if [ "$BRANCH" != "develop" ] && [ "$BRANCH" != "main" ] && [ "$BRANCH" != "" ]; then
echo "Skip documentation as branch is not develop and not main (is: ${BRANCH}).";
exit 0;
fi;


mkdir -p ./docs/
rm -rf ./docs/coverage/ ./docs/reference/ ./docs/tests/


# TypeDoc in ./docs/referece
npx typedoc

# Test Report in ./docs/tests
npx mocha --reporter mochawesome
mv -f ./mochawesome-report/mochawesome.html ./mochawesome-report/index.html
mv -f ./mochawesome-report ./docs/tests

# Coverage Report in ./doc/coverage
npm run coverage
8 changes: 7 additions & 1 deletion .github/workflows/release-bot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: ReleaseBot

on:
workflow_dispatch:
push:
Expand All @@ -18,6 +17,13 @@ jobs:
with:
repository: sebbo2002/release-bot
path: ./.actions/release-bot
- name: 🔧 Setup npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-releasebot-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-releasebot-
- name: 📦 Install Dependencies
run: npm ci
working-directory: ./.actions/release-bot
Expand Down
113 changes: 0 additions & 113 deletions .github/workflows/release.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/stale-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Cleanup issues and PRs
on:
schedule:
- cron: '0 10 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: 🧹 Cleanup issues & pull requests
uses: actions/stale@v3.0.18
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: |
This issue has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 14 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions :heart:
stale-pr-message: |
This pull request has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 14 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation.
Thank you for your contributions :heart:
days-before-stale: 60
days-before-close: 14
stale-issue-label: stale
stale-pr-label: stale
Loading

0 comments on commit 696a474

Please sign in to comment.