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

Enhance wp-package.json to Support Post-Installation Actions #5

Closed
erikyo opened this issue Nov 30, 2023 · 0 comments · Fixed by #12
Closed

Enhance wp-package.json to Support Post-Installation Actions #5

erikyo opened this issue Nov 30, 2023 · 0 comments · Fixed by #12

Comments

@erikyo
Copy link
Collaborator

erikyo commented Nov 30, 2023

Description:

I am writing to propose an enhancement to the wp-package.json file in the Node.js packager dedicated to installing WordPress plugins and themes. Currently, the packager works seamlessly for installing plugins and themes, but I believe we can add a valuable feature to enhance user experience.

Feature Request:

I would like to suggest the addition of a feature that allows users to specify post-installation actions in the wp-package.json file. These actions could include running commands using wp-cli or any other relevant tasks that users might need after the installation of a WordPress plugin or theme.

Example:

{
  "name": "example",
  "wordpress": [...],
  "themes": [...],
  "plugins": [...],
  "postInstall": [
    "wp-cli command 1",
    "wp-cli command 2",
    // Additional post-installation commands
  ],
  // Other package configurations
}

Important Note:

It's crucial to ensure that users are aware and responsible for the commands they include in the postInstall section. We should provide clear documentation and warnings to guide users in making informed decisions about the commands they execute.

Benefits:

  • Customization: Users can tailor the post-installation process to their specific needs.
  • Automation: Streamlining common tasks with wp-cli commands can enhance efficiency.
  • Flexibility: This feature provides flexibility without compromising the simplicity of package installation.
erikyo added a commit that referenced this issue Dec 1, 2023
Added functionality to handle and run post-install commands after the packages installation. This includes the extraction of 'postInstall' from the config data, running post-install commands concurrently after plugins and themes installation, and a new method 'runPostInstallCommands' for executing these commands. This allows users to perform necessary actions automatically after the package installation process.

close #5
@erikyo erikyo closed this as completed in #12 Dec 1, 2023
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 a pull request may close this issue.

1 participant