roborourke / wp-less

Provides a LESS compiler compatible with wp_enqueue_style() for rapid CSS development in themes and plugins.
MIT License
217 stars 55 forks source link

Lessphp as git submodule #56

Closed justin-lovell closed 2 years ago

justin-lovell commented 10 years ago

Instead of giving the users the instructions to also download another git repository, let's include it as a submodule.

This would ensure that everything is now kept up to date -- whenever we hear of updates from lessphp, then we just execute the following commands

 git submodule update
 git commit -a
 git push ...
roborourke commented 10 years ago

Thanks @justin-lovell, I'm not sure though if you can have a composer enabled repo and submodules. @Tarendai removed the submodule in favour of using composer to make it easier to stay up to date with lessphp.

What's your opinion @Tarendai?

tomjn commented 10 years ago

I'm assuming that @justin-lovell tested his changes prior to the pull request, did the git-submodules break composer based installation?

Currently composer handles the lessphp dependency in its entirety, completely automatically, with zero maintenance costs, and no supervision, via a widespread and commonplace PHP tool. composer install or composer update handles this, and an archive for distribution can be generated via composer archive. If you have wp-less as a git submodule in another project, you may find it desirable to add composer update in a git hook e.g. post-update.

Alternatively, you can remove the need for the git submodule and the parent repository in its entirety by using composer to install WordPress and the entire set of plugins and themes, but I sense that would not be a helpful answer in the short term

I would also note that the pull request removes the vendor folder from the .gitignore, which would lead to a lot of files being pulled in as untracked files on any git activity for a composer user or developer using composer, e.g the composer class autoloader. Regardless of the decision, that change should be undone.

justin-lovell commented 10 years ago

Hi guys,

I tested my changes as far as git sub-modules are concerned. To clarify the purpose of removing the vendor directory from .gitignore was solely based for git to track the submodule. However, I did not consider the composer workflow model (since most of the work I do is chained with the git clone --recursive ... workflow).

With respects to your comments @Tarendai, please give me until Friday to think a little further about what you said. I agree with everything you said, and if I cannot bring anything further to the table, I agree to close this pull request.

roborourke commented 9 years ago

Not sure there's a neat way to get the 2 to play nicely. My workflow tends to be based more around submodules than composer. Will have a think but we may have to have and maintain a separate composer branch.

roborourke commented 9 years ago

@justin-lovell it's not ideal but we could have a git submodule on a different path and just check for that as well in the file_exists() checks. Would be happy to have that option.