wesleytodd / YeoPress

A Yeoman generator for WordPress
Other
1.08k stars 161 forks source link

Install the files in a subfolder #30

Closed Melindrea closed 10 years ago

Melindrea commented 11 years ago

Hi there,

This seems to be a very useful project, but would it be possible to get it to install the files in a subfolder? As in, I want the git init to be in the root, while the index.php etc ends up in a subfolder of my choosing. Basically part of my workflow have me wanting to separate those.

wesleytodd commented 11 years ago

So you want this:

- .git
- docroot
  | - wp-admin
  | - wp-includes
  | - wp-content
  | - wp-config.php
  | - index.php

I cannot imagine that this is a common configuration, but if other people out there also use this setup then we can take a look at adding an advanced option for this. So if anyone else wants this chime in here.

In the mean time @Melindrea I would recommend running your git init by itself before running yeopress. You could even make a script to do it in one command like this:

#! /bin/bash
git init
mkdir docroot && cd docroot
yo wordpress
Melindrea commented 11 years ago

Aha, alright, then there's actually no issues, I'd missed that it would accept the parent folder git.

The thing is that I develop frontend and backend separately, and thus I don't want to have the files that are involved with WordPress in the root (that's where I keep my gruntfile, my bower files, etc). So, my workflow is to generate the project using yo webapp or my WIP generator, and then I'd invoke yo wordpress, if it's a WP project. Why reinvent the wheel, after all?

wesleytodd commented 11 years ago

Makes perfect sense @Melindrea. The only thing to remember when running with this configuration is that you cannot use the "wordpress as a submodule" configuration because it relies on the "use git" configuration. If that is alright with you then can you close out the issue?

Melindrea commented 11 years ago

Actually, it was the submodule bits I liked =) On the train, will give details when I'm home.

Wes Todd notifications@github.com skrev:

Makes perfect sense @Melindrea. The only thing to remember when running with this configuration is that you cannot use the "wordpress as a submodule" configuration because it relies on the "use git" configuration. If that is alright with you then can you close out the issue?


Reply to this email directly or view it on GitHub: https://github.com/wesleytodd/YeoPress/issues/30#issuecomment-23663169

Skickat från min Android-telefon med K-9 E-post. Ursäkta min fåordighet.

Melindrea commented 11 years ago

Alright, back home now.

basically, the file structure I'm interested in (and I can fix this post-yeopress, obviously) is the following:

    .git
    app # for frontend stuff, obviously
    test

    wordpress
       wp-content
       index.php
       system # the wordpress core files

If I'm the only one interested in this kind of functionality I'll work around it, I just like your project and it seems a waste to duplicate effort =)

wesleytodd commented 11 years ago

What if I made the "install wordpress as a submodule" not dependent on the "use git", but only for advanced mode. Then you could run yo wordpress --advanced and get the option to install it as a submodule, which would obviously error out if you forgot to setup your git repo first. You could do your preliminary setup of the root, and then $ mkdir wordpress && cd wordpress && yo wordpress. Sound right?

Melindrea commented 11 years ago

That sounds good to me =)

wesleytodd commented 11 years ago

@Melindrea How does this look? 4de12261128824297cb7d8ebc351528aec8d1ae6

If you want to try this branch you can checkout submodule-no-git and npm link it. Before I merge this feature I want to make sure it satisfies your workflow since it is probably not that useful for other people, and it might enable people to enter settings that break the install.

wesleytodd commented 11 years ago

@Melindrea Let me know if you are still interested in this feature. Or if anyone else is please chime in. Otherwise I might close this without merging the feature.

Melindrea commented 11 years ago

Gah! I am, I just have been utterly buried in a combination of school and work. I'll test it this coming week (I'm off work).

(the Gah being more directed towards myself, I'd made a mental note to test it 17 days ago...)

wesleytodd commented 11 years ago

@Melindrea No worries, just wanted to check in.

wesleytodd commented 10 years ago

Closing, feel free to re-open if/when you would like to take a look at this again.