Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): add docs/snippets to npm workspace #1251

Merged
merged 3 commits into from
Jan 16, 2023

Conversation

dreamorosi
Copy link
Contributor

Description of your changes

As part of the efforts described in #729 we are extracting the code snippets present in the docs in their own files, so that we can apply linting as part of our CI.

In order to do that, these code snippets need to:

  • have access to external dependencies (i.e. @middy/core, @aws-sdk/client-dynamodb, etc.)
  • have access to the current version of the @aws-lambda-powertools/* packages, which might be still not available on npm
  • share the same .eslintrc.js file as the rest of the monorepo (for best practices)

To comply with these three points, we have decided to add the docs/snippets folder to the npm workspace that contains the rest of the utilities (and soon the layer-publisher folder too).

This PR does the following:

  • initializes a new npm project under docs/snippets and makes it part of the wider npm workspace
  • adds most (if not all) the devDependencies used by the code snippets (more might be added once linting is applied)
  • adds a new mkdocs plugin that allows to exclude the docs/snippets/node_modules directory from the docs

Closes #1250.

How to verify this change

N/A

Related issues, RFCs

Issue number: #1250

PR status

Is this ready for review?: YES
Is it a breaking change?: NO

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding changes to the examples
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • I have added tests that prove my change is effective and works
  • New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published
  • The PR title follows the conventional commit semantics

Breaking change checklist

  • I have documented the migration process
  • I have added, implemented necessary warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@dreamorosi dreamorosi self-assigned this Jan 16, 2023
@pull-request-size pull-request-size bot added the size/M PR between 30-99 LOC label Jan 16, 2023
@github-actions github-actions bot added the internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) label Jan 16, 2023
@dreamorosi dreamorosi merged commit 439c794 into main Jan 16, 2023
@dreamorosi dreamorosi deleted the chore/docs/snippets_add_workspace branch January 16, 2023 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) size/M PR between 30-99 LOC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: make docs/snippets part of the npm workspace
1 participant