Skip to content

Commit 9ab9fb9

Browse files
committed
chore: clean up runtime docs, spring cleaning of init CLI docs
1 parent c550c56 commit 9ab9fb9

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

scripts/dictionary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ LEANX
2323
Namecheap
2424
ParcelJS
2525
treeshaking
26+
scaffolded

src/views/docs/en/reference/cli/init.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@ category: CLI
44
description: Scaffold new resources found in the app.arc file
55
---
66

7-
Bootstrap new Architect project code. Running `arc init` in an empty directory creates a default `app.arc` manifest file named after that directory with one default function `src/http/get-index`. Edit `app.arc` adding functions and re-run `arc init` to generate further code. This command is intended to be run and re-run; it will only generate files if they do not already exist.
7+
Bootstrap new Architect project code. Running `arc init` in an empty directory creates a default [`app.arc` manifest file][manifest] named after that directory with one default [`@http` function][http] at `src/http/get-index`. Pass a directory name as a final positional argument to create a project in the specified directory. Edit `app.arc`, expanding the [manifest][manifest], adding functions and re-running `arc init` to generate further code. This command is idempotent: intended to be run and re-run; it will only generate files if they do not already exist.
8+
9+
If you run this command with the `--plugin` flag, a scaffolded [Architect plugin][plugins] will be created instead.
810

911
## Usage
1012

1113
```bash
12-
arc init [--static|--runtime]
14+
arc init [flags] [path/to/project-directory]
1315
```
1416

1517
## Flags
1618

17-
- `[--static, -s]` Create a new project with `@static` folder set to `public`
18-
- `[--runtime, -r]` Create a new project with a specified runtime, options are node, deno, python, or ruby
19-
- `[--verbose, -v]` Even more output
19+
- `-n`, `--name`: Set the [`@app` namespace][app] for the created app
20+
- `--no-install`: Do not automatically install `@architect/architect` as a dependency in the project
21+
- `-p`, `--plugin`: Create a new scaffolded [Architect plugin][plugins] instead of a new Architect project
22+
- `--runtime`, `-r`: Create a new project with the specified runtime. Defaults to `node`. See the [`runtime` configuration documentation][runtimes] for available options.
23+
- `--verbose`, `-v`: Even more output
2024

2125
## Local preferences: `@create`
2226

@@ -67,3 +71,9 @@ npm init "@architect" myapp
6771
</arc-tab>
6872
</div>
6973
</arc-viewer>
74+
75+
[app]: ../project-manifest/app
76+
[http]: ../project-manifest/http
77+
[manifest]: ../../get-started/project-manifest
78+
[plugins]: ../../guides/plugins/overview
79+
[runtimes]: ../project-manifest/aws#runtime

src/views/docs/en/reference/configuration/function-config.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ sections:
1818
- 'timeout'
1919
---
2020

21-
Configure individual Lambda function properties (e.g. `src/http/get-index/config.arc`).
21+
Individual Lambda function properties can be customized and configured by modifying the `config.arc` file present in each Lambda functions' directory.
2222

2323
## `@arc`
2424

@@ -79,7 +79,7 @@ Configure the deployed function with [the `@aws` pragma](../project-manifest/aws
7979
- [`memory`](#memory) - number, between `128` and `3008` MB in 64 MB increments.
8080
- [`policies`](#policies) - Configure [AWS SAM policy templates](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-policy-templates.html)
8181
- [`provisionedConcurrency`](#provisionedconcurrency) - number, `1` to AWS account maximum (disabled by default)
82-
- [`runtime`](#runtime) - string, Lambda runtime or alias: `nodejs16.x` (default), `python3.7`, `dotnetcore3.1`, `node`, `py`, `.net`, etc.
82+
- [`runtime`](#runtime) - string, Lambda runtime or alias, see [below](#runtime) for details.
8383
- [`storage`](#storage) - number, between `512` (default) and `10240` MB. The function's ephemeral storage (`/tmp` file system).
8484
- [`timeout`](#timeout) - number, in seconds (max `900`)
8585

@@ -245,14 +245,7 @@ provisionedConcurrency 10
245245

246246
### `runtime`
247247

248-
Configure Lambda function `runtime`:
249-
250-
- Like `nodejs16.x` (default), `nodejs14.x`, `python3.9`, `ruby2.7`
251-
- Unsupported by Sandbox locally: `dotnetcore3.1`, `go1.x`, `java11`
252-
- Or a runtime alias: `nodejs`, `python`, `ruby`, `.net`, `go`, `java`
253-
- Aliases always use the default version of the matched runtime: `ruby` => `ruby2.7`.
254-
255-
See [@aws](../project-manifest/aws) and official [Lambda documentation](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) for further reference.
248+
Sets the Lambda function runtime to use. A version-less alias always references the latest available version for that runtime. See the [@aws `runtime`](../project-manifest/aws) documentation for full list of supported runtimes in Architect, and official [Lambda documentation](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) for further reference.
256249

257250
```arc
258251
@aws

0 commit comments

Comments
 (0)