Replies: 2 comments 1 reply
-
Thanks for your thorough post and questions. This would also have consequences for other commands like installing the presets. I think I prefer option 2 and not have the config file published by default. So power users can publish a config file and change the settings. How about that? If you were to do a PR to add this to all commands that have hard coded folders please target the |
Beta Was this translation helpful? Give feedback.
-
I like the second option too. I've come quite far with the PR, but updating it for all presets as well starts to make it quite complicated, as now all |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I think the Peak CLI commands are awesome and really helpful to speed things up. While I'm quite happy with the basic Peak set up, I do like to add some more structure to my view files by nesting them into folders:
This works well and I only need to tweak the Peak setup a little, e.g. adjust the page builder block partial tag:
But changing the view folder structure breaks the scaffolding commands like
php artisan statamic:peak:add-block
because the folders are hardcoded.I think it would be handy if there is a way to customize the folders. I see two ways how to do this and I'm not sure yet which one is better:
Simply add another question to the
add
commands asking for the folder with a default:✅ Easy to implement, Atomic, no side effects
✅ Adjustable for each block added
❌ More questions/steps
❌ Need to answer every time
Add a publishable config file
peak-cli.php
where all the default view paths are defined and one can customize it there:Then use the config values in the commands:
✅ Configure once and CLI commands works acording to needs
❌ Peak works without any config until now. Not soo nice to have a config just for helper CLI cmds.
I can provide a pull request for both ways, but maybe you can give your opinion on this first?
Beta Was this translation helpful? Give feedback.
All reactions