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

Plugin builder script #100

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Plugin builder script #100

wants to merge 2 commits into from

Conversation

drsdre
Copy link

@drsdre drsdre commented Mar 30, 2021

Build command for creating a new plugin using the boiler plate code and applying the steps as described in the README.txt
Tested on both Bash 3.2 (OSX Darwin) and Bash 4.4 (Linux).
Inspired by https://github.com/hlashbrooke/WordPress-Plugin-Template/blob/master/build-plugin.sh

Build command for creating a new plugin using the boiler plate code and applying the steps as described in the README.txt
Tested on both Bash 3.2 (OSX Darwin) and Bash 4.4 (Linux).
Inspired by https://github.com/hlashbrooke/WordPress-Plugin-Template/blob/master/build-plugin.sh
Use default variables in search-and-replace for easier maintenance.
@cliffordp
Copy link
Owner

@drsdre
🙌👏
Please give me a week to review and test. Looking forward to trying it out!

@cliffordp
Copy link
Owner

@drsdre I had a vacation and then technical difficulties - so I haven't been able to test it myself; thanks for your patience!

What do you think about having %%VARIABLES%% in the repo so as to avoid possible typos or needing to escape apostrophes?

References at #73

@drsdre
Copy link
Author

drsdre commented Apr 14, 2021

I'm not completely sure in what direction you are thinking to take this. Boilerplate code is meant to be changed. Syncing it an updated boilerplate is always going to be painful. It would be better to separate off the updatable code into a library for example a composer package.

@cliffordp
Copy link
Owner

@drsdre thanks for the reply. I meant something like this to be part of this PR:

https://github.com/cliffordp/cliff-wp-plugin-boilerplate/blob/master/readme.txt#L3
cliffpaulick to become {{wporgusername}}
(whatever syntax, I don't care)

Thoughts?

@drsdre
Copy link
Author

drsdre commented Apr 21, 2021

Working with tokens is always safer in search&replace operations. However it does mean that the boilerplate probably does not function as it would right now out of the box. So it boils down to a decision.

To start an implementation like this, we probably should make a list of parameters to be consistent in the naming convention.

@cliffordp
Copy link
Owner

Agreed. I previously had the idea to make a JSON file so someone new could know all the replacements to be made and then have a script go make all those. If I created a JSON, would you be willing to modify your script to loop through it?

As far as working out of the box, I'd guess it'd still work (not break a site) but look unusual. Ideally, I'd like to be able to rename things upon build - so the placeholders could stay in there in case the plugin gets renamed or slug changes after initial setup before initial release. Then, just edit it once in the JSON file and re-build.

@cliffordp
Copy link
Owner

@drsdre any feedback on a direction forward? I appreciated your effort to get this initiated and therefore don't want to ignore your input finalizing this.

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.

2 participants