3 Commits

Author SHA1 Message Date
jacob
6fb9c98a47 more info 2023-09-25 11:00:45 -05:00
jacob
c7a06a0779 more info 2023-09-25 11:00:06 -05:00
jacob
a48f96841a fix: add missing documentation 2023-09-24 18:36:48 -05:00
7 changed files with 22529 additions and 8080 deletions

View File

@@ -15,12 +15,12 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache: npm
- name: Install dependencies
run: yarn install --immutable
run: npm ci
- name: Build website
run: yarn build
run: npm run build
# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus

View File

@@ -26,7 +26,7 @@ const config = {
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en']
locales: ['en', 'fr', 'tr'],
},
presets: [
[
@@ -175,28 +175,16 @@ const config = {
darkTheme: darkCodeTheme,
},
}),
plugins: [
[
'docusaurus-plugin-typedoc',
{
//if you're editing website, please change this to your local branch of sern to generate documentation
entryPoints: ['../sernHandlerV2/src/index.ts'],
tsconfig: '../sernHandlerV2/tsconfig.json',
},
],
[
"@dipakparmar/docusaurus-plugin-umami",
{
websiteID: "e82ff65c-b08f-47b5-8e74-5c31cbcec0ad",
analyticsDomain: "analytics.srizan.dev",
scriptName: 'ua.js',
dataAutoTrack: true,
dataDoNotTrack: true,
dataCache: true,
dataDomains: "sern.dev",
},
]
]
plugins : [
[
'docusaurus-plugin-typedoc',
{
//if you're editing website, please change this to your local branch of sern to generate documentation
entryPoints: ['../sernHandlerV2/src/index.ts'],
tsconfig: '../sernHandlerV2/tsconfig.json',
},
]
]
};
module.exports = config;

View File

@@ -33,22 +33,32 @@ If you do not know how to obtain either of these credentials, [click here](https
- Automatically syncs api with your command base
- generates JSON file of output (**.sern/command-data-remote.json**)
- supports publishing direct esm typescript files
- commonjs users need to compile first and then run sern publish on the dist/ output
- commonjs + javascript users need to compile first and then run sern publish on the dist/ output
- prerequire scripts.
- supports a configuration that is the same as the original publish plugin.
Each command file can have an extra config that follows this typescript interface:
PermissionResolvable is a discord.js type, but it will accept anything that the discord API accepts
Each command file can have an extra config that follows `ValidPublishOptions`:
## Config
```ts
interface ValidPublishOptions {
guildIds: string[];
dmPermission: boolean;
defaultMemberPermissions: PermissionResolvable;
}
type ValidMemberPermissions =
| PermissionFlagBits //discord.js enum
| PermissionFlagBits[] //array of discord.js enum
| string //must be a stringified number
| bigint
interface PublishConfig {
guildIds?: string[];
dmPermission?: boolean;
defaultMemberPermissions: ValidMemberPermissions;
}
type ValidPublishOptions =
| PublishConfig
| (absPath: string, module: CommandModule) => PublishConfig
```
In other words, you can export a function or object.
## Prerequiring
Is there a [service](../guide/walkthrough/services) that is required at the top level of a command?
- Create an ES6 script anywhere:
@@ -58,9 +68,8 @@ import { makeDependencies, single, Service } from '@sern/handler'
import { Client } from 'discord.js'
await makeDependencies({
build: (root) =>
root.add({ "@sern/client": single(() => new Client(...options)) }),
});
root => root.add({ '@sern/client': single(() => new Client(...options) }))
})
await Service('@sern/client').login()
```

View File

@@ -28,7 +28,7 @@ const config = {
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en']
locales: ['en', 'fr', 'tr'],
},
presets: [
[
@@ -177,28 +177,16 @@ const config = {
darkTheme: darkCodeTheme,
},
}),
plugins: [
/* [
'docusaurus-plugin-typedoc',
{
//if you're editing website, please change this to your local branch of sern to generate documentation
entryPoints: ['../sernHandlerV2/src/index.ts'],
tsconfig: '../sernHandlerV2/tsconfig.json',
},
], */
[
"@dipakparmar/docusaurus-plugin-umami",
{
websiteID: "e82ff65c-b08f-47b5-8e74-5c31cbcec0ad",
analyticsDomain: "analytics.srizan.dev",
scriptName: 'ua.js',
dataAutoTrack: true,
dataDoNotTrack: true,
dataCache: true,
dataDomains: "sern.dev",
},
]
]
// plugins : [
// [
// 'docusaurus-plugin-typedoc',
// {
// //if you're editing website, please change this to your local branch of sern to generate documentation
// entryPoints: ['../sernHandlerV2/src/index.ts'],
// tsconfig: '../sernHandlerV2/tsconfig.json',
// },
// ]
// ]
};
module.exports = config;

22482
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -17,7 +17,6 @@
"typedoc-json": "typedoc --json ../sern-community/docs.json --pretty --entryPoints ../sernHandlerV2/src/index.ts --tsconfig ../sernHandlerV2/tsconfig.json --excludeExternals"
},
"dependencies": {
"@dipakparmar/docusaurus-plugin-umami": "^2.1.1",
"@docusaurus/core": "^2.4.0",
"@docusaurus/plugin-content-pages": "^2.4.0",
"@docusaurus/preset-classic": "^2.4.0",
@@ -33,8 +32,7 @@
"@docusaurus/module-type-aliases": "2.0.0-rc.1",
"docusaurus-plugin-typedoc": "latest",
"typedoc": "latest",
"typedoc-plugin-markdown": "latest",
"typescript": "latest"
"typedoc-plugin-markdown": "latest"
},
"browserslist": {
"production": [

8016
yarn.lock

File diff suppressed because it is too large Load Diff