You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/views/docs/en/guides/plugins/overview.md
+30-18Lines changed: 30 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,16 @@ category: Plugins
4
4
description: Overview of Architect's plugin API
5
5
---
6
6
7
-
Architect's plugin API exposes [workflow lifecycle hooks](#workflow-hooks) (such filesystem events in the [Sandbox](/docs/en/reference/cli/sandbox)) and interfaces for [generating cloud resources](#resource-setters) (such as custom Lambdas, or environment variables).
7
+
Architect's plugin API exposes [workflow lifecycle hooks][hooks] (such filesystem events in the [Sandbox][sandbox]) and interfaces for [generating cloud resources][setters] (such as custom Lambdas, or environment variables).
8
8
9
-
This document assumes some existing knowledge of how Architect works, including the [project manifest](/docs/en/get-started/project-manifest), deterministic deployment to AWS via CloudFormation, etc.
9
+
This document assumes some existing knowledge of how Architect works, including the [project manifest][manifest], [deterministic deployment][deployment] to AWS via CloudFormation, etc.
10
10
11
11
12
12
## Finding & installing plugins
13
13
14
-
[Architect maintains a list of officially supported and community developed plugins](https://github.com/architect/plugins); npm is also a great place to [find plugins](https://www.npmjs.com/search?q=arc-plugin-) (and [legacy macros](#macros)).
14
+
[Architect maintains a list of officially supported and community developed plugins](https://github.com/architect/plugins); npm is also a great place to [find plugins](https://www.npmjs.com/search?q=arc-plugin-) (and [legacy macros][macros]).
15
15
16
-
To install a plugin, add a `@plugins` pragma to your project manifest. For example, if you wanted to `npm install` and use both `@architect/plugin-typescript` and `arc-macro-cors`, this is what you'd add to your manifest:
16
+
To install a plugin, add a [`@plugins` pragma][plugins] to your [project manifest][manifest]. For example, if you wanted to `npm install` and use both `@architect/plugin-typescript` and `arc-macro-cors`, this is what you'd add to your manifest:
17
17
18
18
```arc
19
19
@plugins
@@ -25,39 +25,39 @@ You can also use unpublished local plugins like so:
25
25
26
26
```arc
27
27
@plugins
28
-
my-private-plugin # loads from `src/plugins/my-private-plugin[.js|/index.js]`
28
+
my-private-plugin # loads from `src/plugins/my-private-plugin[.[m]js|/index.[m]js]`
29
29
another-private-plugin # loads from `foo/index.js`
30
30
src foo
31
31
```
32
32
33
33
34
34
## Authoring plugins
35
35
36
-
Architect provides an end-to-end suite of workflows, conventions, and optimized defaults for building excellent [Functional Web Apps](https://fwa.dev) with AWS. Architect plugins enable developers to extend (or override) this functionality in a variety of ways with interfaces into both workflows and resource creation.
36
+
Architect provides a suite of workflows, conventions, and optimized defaults for building excellent [Functional Web Apps][fwa] with AWS. Architect plugins enable developers to extend (or override) this functionality in a variety of ways with interfaces into both workflows and resource creation.
37
37
38
38
To create a fresh plugin, you can run `npx arc create --plugin my-plugin-name`
39
39
40
-
Learn more about [hooks for workflow lifecycles](#workflow-hooks) and [cloud resource generation](#resource-setters) below.
40
+
Learn more about [hooks for workflow lifecycles][hooks] and [cloud resource generation][setters] below.
41
41
42
42
43
43
### Workflow hooks
44
44
45
-
Workflow hooks enable developers to extend Architect workflows
45
+
Workflow hooks enable developers to extend Architect workflows and hook into the various Architect CLI commands.
-[`services`](./deploy#deploy.services) - hook into Architect's service discovery to create references to custom resources, or populate config data
47
+
-[`deploy`](./deploy) - hooks for [the `deploy` command][deploy]
48
+
-[`start`](./deploy#deploy.start) - run arbitrary pre-deploy operations like adding custom resources or modifying first-class Architect-created resources by customizing CloudFormation (formerly `@macros`)
49
+
-[`services`](./deploy#deploy.services) - hook into Architect's service discovery to create runtime references to custom resources, or populate config data
50
50
-[`target`](./deploy#deploy.target) - bypass CloudFormation deployment to AWS, and ship the project to an AWS intermediary
51
51
-[`end`](./deploy#deploy.end) - run arbitrary post-deploy operations
52
-
-[`create`](./create)
52
+
-[`create`](./create) - hooks for [the `init` command][init]
53
53
-[`register`](./create#create.register) - register runtimes to create handlers for
54
54
-[`handlers`](./create#create.handlers) - dynamically generate new runtime handlers as you expand your project
55
-
-[`hydrate`](./hydrate)
56
-
-[`copy`](./hydrate#hydrate.copy) - copy files and folders during dependency hydration
57
-
-[`sandbox`](./sandbox)
58
-
-[`start`](./sandbox#sandbox.start) - run arbitrary operations during Sandbox startup
55
+
-[`hydrate`](./hydrate) - hooks for [the `hydrate` command][hydrate]
56
+
-[`copy`](./hydrate#hydrate.copy) - copy files and folders during [dependency hydration][hydrate]
57
+
-[`sandbox`](./sandbox) - hooks for [the `sandbox` command][sandbox]
58
+
-[`start`](./sandbox#sandbox.start) - run arbitrary operations during [Sandbox][sandbox] startup
-[`end`](./sandbox#sandbox.end) - run arbitrary operations during Sandbox shutdown
60
+
-[`end`](./sandbox#sandbox.end) - run arbitrary operations during [Sandbox][sandbox] shutdown
61
61
62
62
63
63
### Resource setters
@@ -94,7 +94,7 @@ Long-time Architect users may be familiar with macros (`@macros` – extensions
94
94
95
95
[Learn more about porting existing macros to plugins](./porting-macros-to-plugins).
96
96
97
-
If you have [existing macros](#macros), they can live side by side in their respective pragma (so long as plugins and macros do not have any conflicting names):
97
+
If you have existing macros, they can live side by side in their respective pragma (so long as plugins and macros do not have any conflicting names):
0 commit comments