Skip to content

Commit 04bd5e4

Browse files
committed
Improve the docs
1 parent b8ae93e commit 04bd5e4

File tree

2 files changed

+33
-4
lines changed
  • build-tests-samples/heft-serverless-stack-tutorial
  • heft-plugins/heft-serverless-stack-plugin

2 files changed

+33
-4
lines changed

build-tests-samples/heft-serverless-stack-tutorial/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This project illustrates usage of the
44
[@rushstack/heft-serverless-stack-plugin](https://www.npmjs.com/package/@rushstack/heft-serverless-stack-plugin)
5-
plugin.
5+
plugin. See that documentation for details.
66

77
## Running the demo
88

@@ -16,9 +16,9 @@ plugin.
1616
# Build the project
1717
$ heft build --sst
1818

19-
# Watch mode
20-
$ heft build --sst watch
19+
# Deploy the stub lambda and launch the local development client
20+
$ heft start --sst
2121

22-
# Run the tests
22+
# Jest tests are run in the usual way
2323
$ heft test
2424
```
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
11
# @rushstack/heft-serverless-stack-plugin
22

33
This is a Heft plugin for building apps using the [Serverless Stack (SST)](https://serverless-stack.com/) framework.
4+
With this approach, the [SST toolchain](https://docs.serverless-stack.com/packages/cli) is only used for
5+
synthesizing CloudFormation stacks and deploying the app, and Heft takes over the role of compiling, linting,
6+
testing your TypeScript project.
7+
8+
The plugin accepts two command-line parameters:
9+
10+
- `--sst` can be appended to `heft build` or `heft start`, causing the corresponding SST operation to be invoked
11+
12+
- `--sst-stage STAGE_NAME` allows you to customize the stage. It is equivalent to the `--stage` parameter
13+
for the SST command-line tool.
14+
15+
16+
The plugin has no effect without the `--sst` parameter. When the parameter is provided:
17+
18+
- `heft build --sst` will behave similar to `sst build`, which synthesizes CloudFormation stacks
19+
in the `build/cdk.out/` directory. See [this documentation](https://docs.serverless-stack.com/packages/cli#build)
20+
for details. Heft's `--watch` mode is also supported.
21+
22+
- `heft start --sst` will behave similar to `sst start`, which deploys a
23+
[stub lambda](https://docs.serverless-stack.com/live-lambda-development#sst-start) to AWS
24+
and then launches the WebSocket client locally for debugging. See
25+
[this documentation](https://docs.serverless-stack.com/packages/cli#start) for details.
26+
27+
28+
> Note that `heft build --sst` currently requires AWS credentials, which limits the ability to perform this
29+
> validation in a monorepo environment where we can't assume that every developer works on AWS.
30+
> Issue [serverless-stack#1537](https://github.com/serverless-stack/serverless-stack/issues/1537)
31+
> is tracking a possible improvement.
32+

0 commit comments

Comments
 (0)