Skip to content

Commit ebb4fa5

Browse files
authored
Merge pull request #92 from Peter-MJ-Parker/patch-5
Add tip for multiple commands dirs
2 parents 505438d + 05b5961 commit ebb4fa5

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

src/content/docs/v4/reference/config.mdx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ import { FileTree } from '@astrojs/starlight/components';
3232
```js title='src/config.js'
3333
export const commands = './dist/commands'
3434
```
35-
35+
:::tip
36+
`commands` also supports an array of folders!
37+
```js title='src/config.js'
38+
export const commands = ['./dist/commands', './dist/components']
39+
```
40+
This allows you to input your buttons, select menus, and modals separate from commands!
41+
:::
3642
We will pass this file so sern can start properly.
3743

3844
```js title='src/index.js'
@@ -68,10 +74,12 @@ export const OWNERS = ['182326315813306368']
6874

6975

7076
:::caution
71-
If you use javascript + common.js, star imports do not work. Please export an object default and put your configuration there.
72-
```js
73-
exports.default = {
74-
commands : "./dist/commands",
75-
}
77+
Javascript + common.js is no longer supported! The following method will not work!
78+
We use import/export context!
79+
```diff
80+
-exports.default = {
81+
- commands : "./dist/commands",
82+
-}
83+
+export const commands = './dist/commands';
7684
```
7785
:::

0 commit comments

Comments
 (0)