mirror of
https://github.com/sern-handler/website
synced 2026-06-15 12:22:20 +00:00
Merge pull request #92 from Peter-MJ-Parker/patch-5
Some checks failed
Deploy to GitHub Pages / Deploy to GitHub Pages (push) Has been cancelled
Some checks failed
Deploy to GitHub Pages / Deploy to GitHub Pages (push) Has been cancelled
Add tip for multiple commands dirs
This commit is contained in:
@@ -32,7 +32,13 @@ import { FileTree } from '@astrojs/starlight/components';
|
||||
```js title='src/config.js'
|
||||
export const commands = './dist/commands'
|
||||
```
|
||||
|
||||
:::tip
|
||||
`commands` also supports an array of folders!
|
||||
```js title='src/config.js'
|
||||
export const commands = ['./dist/commands', './dist/components']
|
||||
```
|
||||
This allows you to input your buttons, select menus, and modals separate from commands!
|
||||
:::
|
||||
We will pass this file so sern can start properly.
|
||||
|
||||
```js title='src/index.js'
|
||||
@@ -68,10 +74,12 @@ export const OWNERS = ['182326315813306368']
|
||||
|
||||
|
||||
:::caution
|
||||
If you use javascript + common.js, star imports do not work. Please export an object default and put your configuration there.
|
||||
```js
|
||||
exports.default = {
|
||||
commands : "./dist/commands",
|
||||
}
|
||||
Javascript + common.js is no longer supported! The following method will not work!
|
||||
We use import/export context!
|
||||
```diff
|
||||
-exports.default = {
|
||||
- commands : "./dist/commands",
|
||||
-}
|
||||
+export const commands = './dist/commands';
|
||||
```
|
||||
:::
|
||||
|
||||
Reference in New Issue
Block a user