Skip to content

Commit

Permalink
First setup
Browse files Browse the repository at this point in the history
  • Loading branch information
j3lte committed Nov 24, 2023
0 parents commit 9c71dc8
Show file tree
Hide file tree
Showing 218 changed files with 3,396 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: j3lte

---

**Describe the bug**
A clear and concise description of what the bug is.

**Runtime info:**
- [ ] Deno
- [ ] Node
- OS: [e.g. iOS]
- Version [e.g. 22]

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
35 changes: 35 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build NPM package (On Demand)
on:
workflow_dispatch:
inputs:
version:
description: "Release version (x.y.z):"
required: true

jobs:
release:
name: Build NPM package (On Demand)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Deno
uses: denoland/setup-deno@v1

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: 'https://registry.npmjs.org'

- name: Run Deno dnt
run: deno task npm ${{ github.event.inputs.version }}

- name: Check Version
run: cat ./npm/package.json | jq .version

# - name: Publish to NPM
# run: cd ./npm && yarn publish --verbose --access public --new-version ${{ github.event.inputs.version }}
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPMJS_ACCESS_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build NPM package (On Release)

on:
release:
types:
- published

jobs:
release:
name: Build NPM package (On Demand)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Deno
uses: denoland/setup-deno@v1

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: 'https://registry.npmjs.org'

- name: Run Deno dnt
run: deno task npm ${{ github.ref_name }}

- name: Check Version
run: cat ./npm/package.json | jq .version

# - name: Publish to NPM
# run: cd ./npm && yarn publish --verbose --access public --new-version ${{ github.ref_name }}
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPMJS_ACCESS_TOKEN }}
42 changes: 42 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deno CI (test)

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Deno
uses: denoland/setup-deno@v1

- name: Check format
run: deno fmt --check

- name: Check linting
run: deno lint

- name: Check license
run: deno task check:license

- name: Tests
run: deno task test

- name: Coverage
run: deno task coverage

# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# file: ./.coverage/coverage.lcov
# flags: unittests
# name: codecov-umbrella
# fail_ci_if_error: true
35 changes: 35 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Update version (On Demand)
on:
workflow_dispatch:
inputs:
version:
description: "Version (x.y.z):"
required: true
permissions:
contents: write

jobs:
release:
name: Update version (On Demand)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.38.2

- name: Run Update Version
run: deno task update:version ${{ github.event.inputs.version }}

- name: Commit changes
id: auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update Version (On Demand)
commit_options: '--no-verify'
# tagging_message: ${{ github.event.inputs.version }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.env*
*.json
!deno.json
.DS_Store
node_modules
npm/
_local_testing.ts
.coverage/
coverage.lcov
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 © J.W. Lagendijk 2023. All Rights Reserved.

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.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# mustachio

[![Build Status](https://travis-ci.org/j3lte/mustachio.svg?branch=master)](https://travis-ci.org/j3lte/mustachio)
[![Coverage Status](https://coveralls.io/repos/github/j3lte/mustachio/badge.svg?branch=master)](https://coveralls.io/github/j3lte/mustachio?branch=master)

> -------------------------------------
>
> Work in progress
>
> -------------------------------------
## License

[MIT](LICENSE)

---

[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/j3lte)
50 changes: 50 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"tasks": {
"check:license": "deno run -A ./scripts/check-license.ts --check",
"format": "deno fmt ./src/ ./test/*.ts ./test/helpers/*.ts",
"lint": "deno lint ./src/ ./test/*.ts ./test/helpers/*.ts",
"test": "deno test --allow-read --coverage=.coverage",
"coverage": "deno coverage .coverage --lcov --exclude=/src/node/ --exclude=/test/ --exclude=/scripts/ > ./.coverage/coverage.lcov",
"test:watch": "deno test --watch",
"update:version": "deno run --allow-read --allow-write ./scripts/update-version.ts",
"update:deno_deps": "deno run -A https://deno.land/x/udd/main.ts dev_deps.ts ./scripts/build-npm.ts ./src/lib/Pastebin.ts ./src/lib/Scraper.ts",
"update:deps": "deno task update:deno_deps",
"localTest": "deno run --allow-read --allow-write --allow-run ./scripts/watch-test.ts",
"clean": "rm -r ./coverage",
"npm": "deno run -A ./scripts/build-npm.ts"
},
"fmt": {
"indentWidth": 2,
"lineWidth": 100,
"singleQuote": false,
"useTabs": false,
"proseWrap": "preserve",
"exclude": [
".coverage/",
"npm/",
"./test/helpers/_files/",
".github/",
"README.md"
]
},
"lint": {
"rules": {
"include": [
"ban-untagged-todo",
"explicit-function-return-type"
]
},
"exclude": [
"./_local_testing.ts",
"./test/helpers/_files/",
"npm/"
]
},
"test": {
"exclude": [
"npm/",
"src/node/",
".coverage/"
]
}
}
Loading

0 comments on commit 9c71dc8

Please sign in to comment.