Skip to content

Conversation

eahefnawy
Copy link
Collaborator

This gives us control over the child process running the script, so that we can suppress its output.

"devDependencies": {
"serverless-domain-manager": "^7.4.0",
"serverless-plugin-scripts": "^1.0.2"
"serverless-domain-manager": "^7.4.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This project uses npm workspaces, so don't forget to run npm i in the root to update the lock files.

@@ -0,0 +1,69 @@
import { execSync } from "child_process";

class Scripts {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add inline comments to provide more context for users who might not be familiar with plugins. A few things to cover...

  • Why it exists - to run custom scripts, which we need to run the build script at deploy time, with support for variable resolution from framework, as well as proper stdio handling.
  • How this works - it runs because it's included as a plugin in serverless.yml, and how hooks work.

@eahefnawy eahefnawy merged commit 0619201 into main Oct 16, 2024
1 check passed
@eahefnawy eahefnawy deleted the add-custom-scripts-plugin branch October 16, 2024 09:55
Copy link

@arc675 arc675 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I

Copy link

@arc675 arc675 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

@arc675 arc675 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

@arc675 arc675 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

@arc675 arc675 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

@arc675 arc675 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

@arc675 arc675 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

@arc675 arc675 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

@arc675 arc675 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants