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

Add tip for multiple commands dirs
This commit is contained in:
Jacob Nguyen
2025-04-13 21:55:09 -05:00
committed by GitHub

View File

@@ -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';
```
:::