Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easier front-end development in WP projects #105

Closed
luboskmetko opened this issue Nov 4, 2016 · 7 comments
Closed

Easier front-end development in WP projects #105

luboskmetko opened this issue Nov 4, 2016 · 7 comments
Milestone

Comments

@luboskmetko
Copy link
Member

luboskmetko commented Nov 4, 2016

Based on Kate's feedback, I imagine that at some point we could make front-end development setup at WP projects automated to that extend that front-end developer doesn't need to touch WP admin at all. There is a node wrapper for WordPress CLI, even though it looks it's not been updated for a while https://github.com/gtg092x/node-wp-cli

This would allow to split project development to 2 phases - front-end and WP and allow client to approve templates before WP development starts. At the same time we would still have all advantages of developing front-end and WP in the same code base.

Here are steps, I guess it would require:

  1. Basic scaffolding of WP project type - done
  2. Wildcard vhosts - documented
  3. Automated database creation - Create database during WP setup #100
  4. Core WP install - https://wp-cli.org/commands/core/install/
  5. Activate Timber plugin - https://wp-cli.org/commands/plugin/activate/
  6. Activate Chisel starter theme - https://wp-cli.org/commands/theme/activate/
  7. Adding pages to WP projects - Adding pages to WordPress projects #103 (using WP cli to create pages in WP)
  8. Basic navigation through existing pages - it's already in the starter theme (newly added pages are listed there), but maybe we could make default home page in WP project look same like the project index in the front-end projects.

Let me know what you think.

@luboskmetko luboskmetko added this to the 0.6 milestone Nov 8, 2016
@jakub300
Copy link
Collaborator

From my testing: many WP-CLI operations like activation of plugin/theme, creation of a post require access to database so it will not work if env variables are used.

@luboskmetko
Copy link
Member Author

Good to know, but I think benefits of using wp-cli to automate various operations are worth using DB credentials in local config instead env variables. I've just tried it too, installation on Windows was a bit cumbersome for me, but now it works nice.

@jakub300
Copy link
Collaborator

so, do we now require plain text credentials during generation or should I prepare separated handling (no wp-cli, etc.) for situation when user gives env variables?

@luboskmetko
Copy link
Member Author

Don't know what that separate handling means exactly but I would use WP-CLI for everything and only skip steps which require proper DB credentials (you will need to take care of that anyway, if user provides wrong credentials).

I don't use env variables so if that's up to me we could leave them out completely but maybe talk to other WP developers first. env variables make manual installation easier because you can avoid one wp-config.php edit but if we make the whole WP install automatic, using them doesn't make that much sense anymore.

If it comes to easier project setup, in the XH generator we had an option to scaffold the project from provided yo-rc.json . This would be handy at some point, and I imagine that part of it could be a file with local DB credentials (of course, it cannot be committed).

@jakub300
Copy link
Collaborator

@luboskmetko Should that be closed now?

@luboskmetko
Copy link
Member Author

@jakub300 let's leave it open yet as I'm still working on #112 which should complete this. Of course, we could release new version with what we have in the meanwhile.

@luboskmetko
Copy link
Member Author

Actually, closing this as a basic navigation through existing pages already exists and further starter theme improvements would be done a bit differently (not using front-end index, but rather white label theme)

@luboskmetko luboskmetko modified the milestones: 0.5, 0.6 Nov 30, 2016
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

No branches or pull requests

2 participants