Skip to content

Plugin builder script#100

Open
drsdre wants to merge 2 commits into
cliffordp:masterfrom
drsdre:build_cmd
Open

Plugin builder script#100
drsdre wants to merge 2 commits into
cliffordp:masterfrom
drsdre:build_cmd

Conversation

@drsdre

@drsdre drsdre commented Mar 30, 2021

Copy link
Copy Markdown

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

drsdre added 2 commits March 30, 2021 13:43
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
Copy Markdown
Owner

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

@cliffordp

Copy link
Copy Markdown
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

drsdre commented Apr 14, 2021

Copy link
Copy Markdown
Author

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
Copy Markdown
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

drsdre commented Apr 21, 2021

Copy link
Copy Markdown
Author

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
Copy Markdown
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
Copy Markdown
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