Skip to content
This repository was archived by the owner on Jul 27, 2023. It is now read-only.

Commit 85e988c

Browse files
committed
release: v1.0.0
0 parents  commit 85e988c

19 files changed

+572
-0
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
docs
2+
lib
3+
.husky

.eslintrc.js

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
module.exports = {
2+
env: {
3+
commonjs: true,
4+
es6: true,
5+
node: true
6+
},
7+
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
8+
globals: {
9+
NodeJS: true
10+
},
11+
parser: '@typescript-eslint/parser',
12+
parserOptions: {
13+
ecmaVersion: 6,
14+
sourceType: 'module'
15+
},
16+
plugins: ['@typescript-eslint'],
17+
rules: {
18+
'prettier/prettier': 'warn',
19+
'no-cond-assign': [2, 'except-parens'],
20+
'no-unused-vars': 0,
21+
'@typescript-eslint/no-unused-vars': 1,
22+
'no-empty': [
23+
'error',
24+
{
25+
allowEmptyCatch: true
26+
}
27+
],
28+
'prefer-const': [
29+
'warn',
30+
{
31+
destructuring: 'all'
32+
}
33+
],
34+
'spaced-comment': 'warn'
35+
},
36+
overrides: [
37+
{
38+
files: ['test/**/*.ts'],
39+
globals: {
40+
describe: true,
41+
it: true,
42+
beforeEach: true
43+
}
44+
}
45+
]
46+
};

.github/FUNDING.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
patreon: Snazzah
2+
ko_fi: Snazzah
3+
github: Snazzah

.github/dependabot.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "npm" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/workflows/lint.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: ESLint
2+
on:
3+
push:
4+
branches:
5+
- "*"
6+
- "!docs"
7+
paths:
8+
- "src/**"
9+
- ".eslintignore"
10+
- ".eslintrc.*"
11+
- ".prettierrc"
12+
- ".github/workflows/lint.yml"
13+
workflow_dispatch:
14+
15+
jobs:
16+
lint:
17+
name: Lint source code
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v2
22+
23+
- name: Install Node v12
24+
uses: actions/setup-node@v1
25+
with:
26+
node-version: 12.x
27+
28+
- name: Install dependencies
29+
run: npm install
30+
31+
- name: Run ESLint
32+
run: npm run lint:fix
33+
34+
- name: Commit changes
35+
uses: EndBug/add-and-commit@v4
36+
with:
37+
add: src
38+
message: "chore(lint): auto-lint source code"
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
tag:
8+
name: Add/update 'latest' tag
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v2
14+
15+
- name: Run latest-tag
16+
uses: EndBug/latest-tag@v1
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
20+
# docs:
21+
# name: Update docs
22+
# runs-on: ubuntu-18.04
23+
# needs: tag
24+
#
25+
# steps:
26+
# - name: Checkout repository
27+
# uses: actions/checkout@v2
28+
#
29+
# - name: Setup Node 12.x
30+
# uses: actions/setup-node@v1
31+
# with:
32+
# node-version: 12.x
33+
#
34+
# - name: Install dependencies
35+
# run: npm install
36+
#
37+
# - name: Build documentation
38+
# run: npm run docs
39+
#
40+
# - name: Deploy documentation
41+
# uses: dbots-pkg/action-docs@v1
42+
# env:
43+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
45+
publish-npm:
46+
name: Publish on NPM
47+
runs-on: ubuntu-latest
48+
# needs: docs
49+
50+
steps:
51+
- uses: actions/checkout@v2
52+
53+
- name: Set up Node.js for NPM
54+
uses: actions/setup-node@v1
55+
with:
56+
registry-url: 'https://registry.npmjs.org'
57+
58+
- run: npm install
59+
- run: npm publish
60+
env:
61+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
62+
63+
publish-gpr:
64+
name: Publish on GPR
65+
runs-on: ubuntu-latest
66+
# needs: docs
67+
68+
steps:
69+
- uses: actions/checkout@v2
70+
71+
- name: Set up Node.js for GPR
72+
uses: actions/setup-node@v1
73+
with:
74+
registry-url: 'https://npm.pkg.github.com/'
75+
scope: '@dexare'
76+
77+
- run: npm install
78+
- run: npm publish
79+
env:
80+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Packages
2+
node_modules/
3+
yarn.lock
4+
package-lock.json
5+
6+
# Log files
7+
logs/
8+
*.log
9+
10+
# Miscellaneous
11+
.tmp/
12+
.vscode/
13+
docs/docs.json
14+
webpack/
15+
testing/
16+
.husky/_/
17+
lib/

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged
5+
npm run build

.npmignore

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Packages
2+
node_modules/
3+
yarn.lock
4+
package-lock.json
5+
6+
# Log files
7+
logs/
8+
*.log
9+
10+
# Authentication
11+
deploy/
12+
13+
# Miscellaneous
14+
.tmp/
15+
.vscode/
16+
.idea/
17+
scripts/
18+
static/
19+
docs/
20+
21+
# NPM ignore
22+
.eslintignore
23+
.eslintrc.js
24+
.gitattributes
25+
.gitignore
26+
.editorconfig
27+
.prettierrc
28+
.github/
29+
.dependabot/
30+
test/
31+
testing/
32+
tsconfig.json
33+
.husky/_/

.prettierrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"useTabs": false,
6+
"endOfLine": "lf",
7+
"trailingComma": "none",
8+
"printWidth": 110
9+
}

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
## [1.0.0] - 2021-04-05
9+
- Initial release.
10+
11+
[Unreleased]: https://github.com/Dexare/dbots/compare/v1.0.0...HEAD
12+
[1.0.0]: https://github.com/Dexare/dbots/releases/tag/v1.0.0

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Snazzah
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# @dexare/dbots
2+
A [Dexare](https://github.com/Dexare/Dexare) module for [dbots](https://dbots.js.org).
3+
4+
```sh
5+
npm install @dexare/dbots
6+
```
7+
8+
```js
9+
const { DexareClient } = require('dexare');
10+
const DBotsModule = require('@dexare/dbots');
11+
12+
const config = {
13+
// All props in this config are optional, defaults are shown unless told otherwise
14+
dbots: {
15+
// The keys to use for the supported services, the default is an empty object
16+
keys: {
17+
discordbotsgg: '',
18+
topgg: '',
19+
lsterminalink: '',
20+
carbon: ''
21+
},
22+
// How often (in milliseconds) the poster should post its stats
23+
interval: 1800000,
24+
// Whether to autopost when the client is ready
25+
autopost: true,
26+
// The custom services to post to: https://dbots.js.org/#/docs/main/latest/examples/custom-service
27+
customServices: []
28+
}
29+
}
30+
31+
const client = new DexareClient(config);
32+
client.loadModules(DBotsModule);
33+
// ...
34+
```

package.json

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "@dexare/dbots",
3+
"version": "1.0.0",
4+
"description": "A Dexare module for the NPM package dbots",
5+
"main": "./lib/index.js",
6+
"types": "./lib/index.d.ts",
7+
"author": "Snazzah",
8+
"license": "MIT",
9+
"repository": "https://github.com/Dexare/dbots",
10+
"bugs": {
11+
"url": "https://github.com/Dexare/dbots/issues"
12+
},
13+
"funding": {
14+
"url": "https://github.com/sponsors/Snazzah"
15+
},
16+
"keywords": [
17+
"dexare",
18+
"dexare-module"
19+
],
20+
"scripts": {
21+
"build": "([ ! -d \"lib/\" ] || rm -r lib/*) && npx tsc",
22+
"build:prepare": "[ -d \"lib/\" ] || npm run build",
23+
"changelog": "ts-node scripts/changelog",
24+
"lint": "npx eslint --ext .ts ./src",
25+
"lint:fix": "npx eslint --ext .ts ./src --fix",
26+
"test": "mocha -r ts-node/register --extension ts",
27+
"prepare": "npx husky install && npm run build:prepare",
28+
"prepublishOnly": "([ -d \"lib/\" ] || (echo \"lib folder does not exist\" && exit 1)) && npm run lint:fix"
29+
},
30+
"lint-staged": {
31+
"*.ts": "eslint --fix"
32+
},
33+
"dependencies": {
34+
"dbots": "^8.0.2",
35+
"dexare": "^1.3.0"
36+
},
37+
"devDependencies": {
38+
"@types/node": "^14.14.22",
39+
"@typescript-eslint/eslint-plugin": "^4.14.1",
40+
"@typescript-eslint/parser": "^4.14.1",
41+
"eslint": "^7.18.0",
42+
"eslint-config-prettier": "^8.0.0",
43+
"eslint-plugin-prettier": "^3.3.1",
44+
"husky": "^6.0.0",
45+
"lint-staged": "^10.5.4",
46+
"prettier": "^2.2.1",
47+
"ts-node": "^9.1.1",
48+
"typescript": "^4.1.3",
49+
"yarn": "^1.22.10"
50+
}
51+
}

0 commit comments

Comments
 (0)