Skip to content

Commit

Permalink
fix(docs): add mdn links (#27)
Browse files Browse the repository at this point in the history
* chore: add mdn links

* fix: skiplibcheck

* fix(docs): codeblock fix

* fix(docs): fix broken link tags

* fix(docs): syns with your package

* chore: use workspace again

* chore: readd docs workflow
  • Loading branch information
imranbarbhuiya committed May 7, 2022
1 parent f544fa2 commit 82073c3
Show file tree
Hide file tree
Showing 13 changed files with 87 additions and 41 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy Docs

on:
workflow_dispatch:

jobs:
build-and-deploy:
name: Deploy Docs to gh-pages
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
with:
fetch-depth: 0
repository: 'imranbarbhuiya/tagscript'
ref: 'main'
- name: Add TypeScript problem matcher
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
- name: Use Node.js v16
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # tag=v3
with:
node-version: 16
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
- name: Build all packages
run: yarn build
- name: Generate Docs
run: yarn docs
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@8817a56e5bfec6e2b08345c81f4d422db53a2cdc # tag=v4.3.3
with:
branch: gh-pages
folder: docs
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.4",
"jest": "^28.0.3",
"jest": "^28.1.0",
"lint-staged": "^12.4.1",
"prettier": "^2.6.2",
"pretty-quick": "^3.1.3",
Expand All @@ -45,6 +45,7 @@
"typedoc": "^0.22.15",
"typedoc-monorepo-link-types": "^0.0.2",
"typedoc-plugin-djs-links": "^1.0.4",
"typedoc-plugin-mdn-links": "^1.0.6",
"typescript": "^4.6.4"
},
"repository": {
Expand Down
37 changes: 20 additions & 17 deletions packages/tagscript-plugin-discord/cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ body = """
{% for group, commits in commits | group_by(attribute="group") %}
## {{ group | upper_first }}
{% for commit in commits %}
- {% if commit.breaking %}\
[**breaking**] \
{% endif %}\
{% if commit.scope %}\
**{{commit.scope}}:** \
{% endif %}\
- {% if commit.scope %}\
**{{commit.scope}}:** \
{% endif %}\
{{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/imranbarbhuiya/tagscript/commit/{{ commit.id }}))\
{% if commit.breaking %}}\
\n\n {% raw %} {% endraw %} ### 💥 Breaking Changes:\n \
{% for breakingChange in commit.footers %}\
{% raw %} {% endraw %} - {{ breakingChange }}\n\
{% endfor %}\
{% endif %}\
{% endfor %}
{% endfor %}\n
"""
Expand All @@ -37,21 +40,21 @@ footer = ""
conventional_commits = true
filter_unconventional = true
commit_parsers = [
{ message = "^feat", group = "Features"},
{ message = "^fix", group = "Bug Fixes"},
{ message = "^docs", group = "Documentation"},
{ message = "^perf", group = "Performance"},
{ message = "^refactor", group = "Refactor"},
{ message = "^typings", group = "Typings"},
{ message = "^types", group = "Typings"},
{ message = ".*deprecated", body = ".*deprecated", group = "Deprecation"},
{ message = "^feat", group = "🚀 Features"},
{ message = "^fix", group = "🐛 Bug Fixes"},
{ message = "^docs", group = "📝 Documentation"},
{ message = "^perf", group = "🏃 Performance"},
{ message = "^refactor", group = "🏠 Refactor"},
{ message = "^typings", group = "⌨️ Typings"},
{ message = "^types", group = "⌨️ Typings"},
{ message = ".*deprecated", body = ".*deprecated", group = "🚨 Deprecation"},
{ message = "^revert", skip = true},
{ message = "^style", group = "Styling"},
{ message = "^test", group = "Testing"},
{ message = "^style", group = "🪞 Styling"},
{ message = "^test", group = "🧪 Testing"},
{ message = "^chore", skip = true},
{ message = "^ci", skip = true},
{ message = "^build", skip = true},
{ body = ".*security", group = "Security"},
{ body = ".*security", group = "🛡️ Security"},
]
filter_commits = true
tag_pattern = "tagscript@[0-9]*"
Expand Down
5 changes: 2 additions & 3 deletions packages/tagscript-plugin-discord/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"devDependencies": {
"@favware/rollup-type-bundler": "^1.0.7",
"discord.js": "^13.6.0",
"tagscript": "*",
"tagscript": "workspace:^",
"tsup": "^5.12.7",
"typescript": "^4.6.4"
},
Expand All @@ -60,6 +60,5 @@
"bugs": {
"url": "https://github.com/imranbarbhuiya/tagscript/issues"
},
"homepage": "https://tagscript.js.org/",
"packageManager": "yarn@3.2.0"
"homepage": "https://tagscript.js.org/"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ export interface SafeValues<T> {
}

/**
* Transformer for Discord.js objects.
*
* @abstract
* Transformer for {@link https://discord.js.org/#/ Discord.js} objects.
*/
export abstract class BaseTransformer<T extends GuildTextBasedChannel | Role | User | GuildMember | Guild> implements ITransformer {
protected base: T;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type { Guild } from 'discord.js';
import { BaseTransformer } from './Base';

/**
* Transformer for Discord {@link Guild}
* Transformer for Discord {@link https://discord.js.org/#/docs/discord.js/stable/class/Guild Guild}
*
* @properties
* ```
* ```yaml
* id: Gives guild id.
* name: Gives guild name.
* description: Gives guild description.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type { GuildMember } from 'discord.js';
import { BaseTransformer } from './Base';

/**
* Transformer for {@link GuildMember}.
* Transformer for {@link https://discord.js.org/#/docs/discord.js/stable/class/GuildMember GuildMember}.
*
* @properties
* ```
* ```yaml
* id: Gives member id.
* mention: Mentions the member.
* username: Gives username of the member.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type { GuildTextBasedChannel } from 'discord.js';
import { BaseTransformer } from './Base';

/**
* Transformer for Discord {@link GuildTextBasedChannel}
* Transformer for Discord {@link https://discord.js.org/#/docs/discord.js/stable/class/BaseGuildTextChannel GuildTextBasedChannel}
*
* @properties
* ```
* ```yaml
* id: Gives channel id.
* mention: Mentions the channel.
* name: Gives channel name.
Expand Down
4 changes: 2 additions & 2 deletions packages/tagscript-plugin-discord/src/lib/Transformer/Role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type { Role } from 'discord.js';
import { BaseTransformer } from './Base';

/**
* Transformer for Discord {@link Role}
* Transformer for Discord {@link https://discord.js.org/#/docs/discord.js/stable/class/Role Role}
*
* @properties
* ```
* ```yaml
* id: Gives role id.
* name: Gives role name.
* mention: Mentions the role.
Expand Down
4 changes: 2 additions & 2 deletions packages/tagscript-plugin-discord/src/lib/Transformer/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type { User } from 'discord.js';
import { BaseTransformer } from './Base';

/**
* Transformer for {@link User}
* Transformer for {@link https://discord.js.org/#/docs/discord.js/stable/class/User User}
*
* @properties
* ```
* ```yaml
* id: Gives user id.
* mention: Mentions the user.
* username: Gives username of the user.
Expand Down
3 changes: 1 addition & 2 deletions packages/tagscript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,5 @@
"bugs": {
"url": "https://github.com/imranbarbhuiya/tagscript/issues"
},
"homepage": "https://tagscript.js.org/",
"packageManager": "yarn@3.2.0"
"homepage": "https://tagscript.js.org/"
}
3 changes: 2 additions & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
"strictNullChecks": true,
"noImplicitThis": true,
"alwaysStrict": true,
"skipLibCheck": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"lib": ["es2021"],
"lib": ["esnext"],
"declaration": true,
"outDir": "dist"
},
Expand Down
18 changes: 14 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4584,7 +4584,7 @@ __metadata:
languageName: node
linkType: hard

"jest@npm:^28.0.3":
"jest@npm:^28.1.0":
version: 28.1.0
resolution: "jest@npm:28.1.0"
dependencies:
Expand Down Expand Up @@ -6169,7 +6169,7 @@ __metadata:
eslint-config-prettier: ^8.5.0
eslint-plugin-prettier: ^4.0.0
husky: ^7.0.4
jest: ^28.0.3
jest: ^28.1.0
lint-staged: ^12.4.1
prettier: ^2.6.2
pretty-quick: ^3.1.3
Expand All @@ -6179,6 +6179,7 @@ __metadata:
typedoc: ^0.22.15
typedoc-monorepo-link-types: ^0.0.2
typedoc-plugin-djs-links: ^1.0.4
typedoc-plugin-mdn-links: ^1.0.6
typescript: ^4.6.4
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -6669,7 +6670,7 @@ __metadata:
dependencies:
"@favware/rollup-type-bundler": ^1.0.7
discord.js: ^13.6.0
tagscript: "*"
tagscript: "workspace:^"
tsup: ^5.12.7
typescript: ^4.6.4
peerDependencies:
Expand All @@ -6678,7 +6679,7 @@ __metadata:
languageName: unknown
linkType: soft

"tagscript@*, tagscript@workspace:packages/tagscript":
"tagscript@workspace:^, tagscript@workspace:packages/tagscript":
version: 0.0.0-use.local
resolution: "tagscript@workspace:packages/tagscript"
dependencies:
Expand Down Expand Up @@ -7206,6 +7207,15 @@ __metadata:
languageName: node
linkType: hard

"typedoc-plugin-mdn-links@npm:^1.0.6":
version: 1.0.6
resolution: "typedoc-plugin-mdn-links@npm:1.0.6"
peerDependencies:
typedoc: 0.22.x
checksum: c88601e492b2993e9f6fc8f11bd4b7854c7fa98e27b0c77ecdf6ac3352cfb0f6e98c37ea490e5486f486cc9c92bdd9f170cd6d9e69adcf30542cf2112436e9d0
languageName: node
linkType: hard

"typedoc@npm:^0.22.15":
version: 0.22.15
resolution: "typedoc@npm:0.22.15"
Expand Down

0 comments on commit 82073c3

Please sign in to comment.