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

Build hooks #10

Open
kierzniak opened this issue Nov 2, 2017 · 2 comments
Open

Build hooks #10

kierzniak opened this issue Nov 2, 2017 · 2 comments

Comments

@kierzniak
Copy link

Hi,
some of our plugins need build script to be executed before being deployed to wordpress.org plugin repository. Maybe you can provide some kind of event system to subscribe into particular part of the script e.g after/before git clone/checkout.

For a start I can propose such a cli options --after-git-clone="./build.sh", --after-git-checkout="./build.sh"

@rayrutjes
Copy link
Owner

Hey @kierzniak , thanks a lot for your interesting feature request.

I am under the impression that having "build" scripts is often not recommended in the WP eco-system. A user must be able to clone the repo and be up & running, or even be able to use a composer setup to install your plugin.

I also personally don't like committing minified assets and stuff, but I guess it's a compromise for easing the DX.

What are your thoughts on this? I'm far from being an expert on WP tooling and I'd gladly continue the discussion as I'm not sold on anything.

What I do know is that I plan to separate the current script into several smaller scoped re-usable scripts in order for developers to only use what they need.

Speak soon!

@kierzniak
Copy link
Author

Thank you for your response. You may have right that WP ecosystem is not adapted to such a case. I'm trying to apply modern and best standards to have best product and keep up with php community.

Minified assets are not the worst. I'm including composer libraries which are different for production and development e.g phpunit, phing which obviously are not desired in production release. I'm trying to reduce dependencies to minimum, but for some libraries this is reinventing the wheel.

Git clone case is not bothering me, for such a problem we have github releases which should contain all required libraries and assets. I'm using composer setup for my WP projects and I use https://wpackagist.org/ where plugins are downloaded from wordpress.org repository.

Nevertheless your propose for separate script should fit my needs.

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

No branches or pull requests

2 participants