Skip to content

Commit 5657202

Browse files
committed
chore: wip
chore: wip
1 parent 0bf79a4 commit 5657202

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

.stacks/core/config/src/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
import { StacksOptions } from '@stacksjs/types'
12
import defaults from './defaults'
23
import overrides from './overrides'
34
import { defu } from 'defu'
45

5-
export const config = defu(overrides, defaults)
6+
export const config: StacksOptions = defu(overrides, defaults)
67

78
export { defaults, overrides }
89

app/actions/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# What are Actions?
2+
3+
Actions introduce a concept of unique code reusability. They are "functions" that can be called from anywhere in the application. For example, they may be used as a ...
4+
5+
- CLI Command
6+
- HTTP Controller
7+
- Event Listener
8+
- Cron Job _(Queued Jobs)_
9+
10+
One unique Stacks feature of Actions is that they may also be called from anywhere in the frontend, dramatically simplifying API integrations.
11+
12+
```ts
13+
import { action } from '@stacksjs/actions';
14+
15+
await runAction('NewActionName', { foo: 'bar' });
16+
// or
17+
await runAction('NewActionName', { foo: 'bar' }, { queue: 'default' });
18+
```
19+
20+
_Please note, Actions are not limited to these use cases, but these are the most common ones._
21+
22+
## Get Started
23+
24+
The following command will create a new action file in the `app/actions` dir.
25+
26+
```sh
27+
buddy make:action NewActionName
28+
```

bun.lockb

10.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)