Closed
Description
Summary
Currently the code snippets of the documentation live under the docs/snippets
folder. This location was chosen before we expanded the npm workspace to other packages under the packages/*
directory, which means we also had to use TypeScript paths
to "link" the utilities to the snippets.
Additionally, these code samples are hard to find and in a different place from where customers might expect to find them - i.e. under examples
.
Why is this needed?
So that customers can refer to them and find them more easily.
Additionally, the TypeScript config change will also streamline the project's setup.
Which area does this relate to?
Other
Solution
The change will have to be made in this order:
- remove the
docs/snippet
npm workspace (might need to runnpm un -w docs/snippets
but not sure) - move the entire content of
docs/snippets
toexamples/snippets
- add back the workspace to the larger npm workspace (might need to run
npm i -w examples/snippets
or simply find & replacedocs/snippets
occurrences inlerna.json
,package.json
, andpackage-lock.json
) - clear all the path aliases in the
tsconfig.json
of the snippets project - add all Powertools utilities as dependency of the snippets workspace (i.e.
npm i @aws-lambda-powertools/logger -w examples/snippets
) - replace all imports in the docs to point to the new location
- replace all occurrences of old location/workspace name in CI - aka under
.github/
Acknowledgment
- This request meets Powertools for AWS Lambda (TypeScript) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Shipped