Skip to content

Commit 60e09f7

Browse files
committed
docs: updating and linking the plugins overview page, referencing that .mjs files are ok for plugin authoring
1 parent a225029 commit 60e09f7

File tree

1 file changed

+30
-18
lines changed

1 file changed

+30
-18
lines changed

src/views/docs/en/guides/plugins/overview.md

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ category: Plugins
44
description: Overview of Architect's plugin API
55
---
66

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).
88

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.
1010

1111

1212
## Finding & installing plugins
1313

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]).
1515

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:
1717

1818
```arc
1919
@plugins
@@ -25,39 +25,39 @@ You can also use unpublished local plugins like so:
2525

2626
```arc
2727
@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]`
2929
another-private-plugin # loads from `foo/index.js`
3030
src foo
3131
```
3232

3333

3434
## Authoring plugins
3535

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.
3737

3838
To create a fresh plugin, you can run `npx arc create --plugin my-plugin-name`
3939

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.
4141

4242

4343
### Workflow hooks
4444

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.
4646

47-
- [`deploy`](./deploy)
48-
- [`start`](./deploy#deploy.start) - run arbitrary pre-deploy operations + customize CloudFormation (formerly `@macros`)
49-
- [`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
5050
- [`target`](./deploy#deploy.target) - bypass CloudFormation deployment to AWS, and ship the project to an AWS intermediary
5151
- [`end`](./deploy#deploy.end) - run arbitrary post-deploy operations
52-
- [`create`](./create)
52+
- [`create`](./create) - hooks for [the `init` command][init]
5353
- [`register`](./create#create.register) - register runtimes to create handlers for
5454
- [`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
5959
- [`watcher`](./sandbox#sandbox.watcher) - act on project filesystem events (e.g. `src/http/get-foo/auth.js``updated`)
60-
- [`end`](./sandbox#sandbox.end) - run arbitrary operations during Sandbox shutdown
60+
- [`end`](./sandbox#sandbox.end) - run arbitrary operations during [Sandbox][sandbox] shutdown
6161

6262

6363
### Resource setters
@@ -94,7 +94,7 @@ Long-time Architect users may be familiar with macros (`@macros` – extensions
9494

9595
[Learn more about porting existing macros to plugins](./porting-macros-to-plugins).
9696

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):
9898

9999
```arc
100100
@plugins
@@ -103,3 +103,15 @@ my-private-plugin
103103
@macros
104104
my-private-macro
105105
```
106+
107+
[hooks]: #workflow-hooks
108+
[sandbox]: ../../reference/cli/sandbox
109+
[plugins]: ../../reference/project-manifest/plugins
110+
[setters]: #resource-setters
111+
[manifest]: ../../get-started/project-manifest
112+
[deployment]: ../developer-experience/deployment
113+
[macros]: #macros
114+
[fwa]: https://fwa.dev
115+
[hydrate]: ../../reference/cli/hydrate
116+
[deploy]: ../../reference/cli/deploy
117+
[init]: ../../reference/cli/init

0 commit comments

Comments
 (0)