Closed saas786 closed 1 year ago
Hi @saas786 did you find a solution?
Hi @gmazzap,
I didn't found a solution yet. I thought it might be doing something incorrect that's why author didn't respond. So closed it.
If you are willing to help, I can provide you with feedback.
Configuration contains one invalid step setting and it
will be ignored.
When I try to debug it, it seems like my extension / package code is not loading.
Have you created any sample package on github which I could load as a test? As mine doesn't seem to work, maybe I have some incorrect setting.
I have tried both
'autoload' & 'wpstarter-autoload'
I have used relative path to project root, and also loaded it as composer package with type
"type": "wpstarter-extension"
Thanks
I thought it might be doing something incorrect that's why author didn't respond.
I'm the author and I did not respond because I've been on vacation in the last 2 weeks and very busy the days before leaving :)
I will have a look as soon as I can, being back just today after two weeks there's a big pile of things on my desk right now.
:) Nice to meet you.
Hopefully you enjoyed your time off.
You must have, nothing urgent, let me know if I can help. Will be happy to help.
Finally got at the bottom of this.
The documentation was wrong.
I was documenting:
"scripts": {
"pre-wpstarter": "MyCompany\\MyProject\\sayHelloBeforeStarting"
}
But in reality vlaues were supposed to be an array, like this:
"scripts": {
"pre-wpstarter": [ "MyCompany\\MyProject\\sayHelloBeforeStarting" ]
}
That is why you got the "invalid script" debug message.
And that also answer the question "Can I have multiple scripts for the same event?" Yes, you can, using an array.
--
With 6977b71 I added support for a single script to be provied as string, as it was documented.
Moreover, I fixed the usage in documentation of a Io
class private method.
Finally, I also made WP Starter less lenient about invalid scripts: if an invalid script is added, it now fails WP Starter execution with a more telling message.
Thanks for reporting, and for the long wait.
Hi there,
I am trying to execute WPStarter script to remove the wp-content dir, but it doens't work.
I have setup a test repo here:
https://github.com/saas786/wpstarter-3-test/blob/wps-scripts/wpstarter.json
which just echo some test string as per: https://github.com/wecodemore/wpstarter/blob/dev/docs/08-Custom-Steps-Development.md#making-steps-classes-autoloadable
but it doesn't work, gets executed.
Can you please point me in right direction, so I could execute WPStarter scripts.
also
can i use same step for multiple scripts like
https://github.com/saas786/wpstarter-3-test/blob/wps-scripts/wpstarter.json#L11
Thanks