Open roryashfordbentley opened 10 years ago
This would be a fine idea. But probably only with the advanced options. If you are interested in creating this feature it should only be 5 or 10 lines. I would be happy to merge a PR.
Im currently working on a pull request but would like your advice...
As the Wordpress repo pulls everything down I will need to delete the theme files just after this process has completed. At first I thought fs.rmdir would do the trick but as I'm sure you know rmdir will throw an error if the folder is not empty. Many suggestions involve adding Rimraf (https://github.com/isaacs/rimraf) as a dependency.
would you mind if I use rimraf for this or do you have an alternate approach?
Other than a bit of tinkering I'm totally new to node :)
This is a summary of what I have done so far
Check out this: https://github.com/ryanmcgrath/wrench-js#synchronous-operations
Wrench is already included to do the recursive chmod.
FYI, that commit looks good. I made my comments over there. Thanks for the good work and I look forward to that PR!
Thanks for the comments, I'm working through it now.
Little update, untested but the concept is there, few tweaks and testing and I should be good to send a pull request later. As always your criticism is welcome!
https://github.com/roikles/YeoPress/commit/d7631e6cd0c5cd1b24e0b867ed110ae138c0d942
https://github.com/roikles/YeoPress/commit/1a211e64d2f3cb5f315e12117aeedbd2c4b46232
Got the process working in the latest commit and I fixed the issue you mentioned about done() being called on every iteration of the for-loop.
I have done some testing and the script is working, however the application no longer outputs the oopsIPeedMyself function... I'm sure its simple enough to fix I just can't put my finger on it.
(You have the best function names btw!)
Hey @roikles Any progress on that PR? I would love to add this feature and close this issue. Let me know!
Would it be at all possible to have an option during the Yeoman prompts asking if you want any of the default themes installing? I know this isn't particularly high priority but would make a nice improvement in later versions. Given that we can effortlessly install an additional theme during the CLI install it seems redundant to also have the 3 default Wordpress themes.