roots / sage-installer

Sage 9 installer
https://github.com/roots/sage
MIT License
30 stars 90 forks source link

postCreateProject: Show warning/more info about local dev #9

Open retlehs opened 6 years ago

retlehs commented 6 years ago
 Local development URL of WP site [http://example.dev]:
 >

 Path to theme directory (e.g., /wp-content/themes/sage) [/app/themes/sage]:
 >

at this point we need to iterate the importance of these values — if entered incorrectly then local dev will be broken

this could just be a link to something in the sage 9 docs

pkarjala commented 6 years ago

Better would be that the installer should provide sane defaults along with messaging.

  1. It should try to determine the local site url using wp-cli if possible. This should be able to be determined fairly easily using wp option get siteurl or other means.

  2. The path to the theme directory should already be available, as the composer script should be running in that path (as per documentation at https://roots.io/sage/docs/theme-installation/), and the user is already asked for the theme directory name when they run the composer create-project roots/sage your-theme-name script. A simple pwd combined with that name would set a sane default, instead of /app/themes/sage.

Will see if I can poke around in code to make this happen, and submit a pull request.