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

Improve project organization #211

Merged
merged 7 commits into from
Apr 21, 2015
Merged

Improve project organization #211

merged 7 commits into from
Apr 21, 2015

Conversation

dmelo
Copy link
Contributor

@dmelo dmelo commented Mar 18, 2015

It is a good practice to keep all the vendor directory out of git. The same goes to files that are meant to be edited, like config.php and the content directory.

In the case of config.php, it was moved to config.php.template, and "config.php" is already inside .gitignore.

The content directory was moved to content-sample. CONTENT_DIR constant is now replaced by $config['content_dir'](on config.php.template) and it's default value is 'content-sample'.

Instructions about how to install and run the project are added on README.md.

I believe it improves the way the project is organized.

dmelo added 7 commits March 18, 2015 06:11
- add vendor to .gitignore
- remove all vendor files
- move content to content-sample
- move config.php to config.php.template
- move the directory content to content-sample
- remove CONTENT_DIR as a define on index.php
- create config value "content_dir" and replace all CONTENT_DIR by it's
correspondent $config['content_dir']
- add the content_dir config on config.php.template
- add install and run instructions on README.
@dmelo
Copy link
Contributor Author

dmelo commented Mar 20, 2015

bump

@derhuerst
Copy link

Have a look how Kirby structures its git repo.

It is a good practice to keep all the vendor directory out of git.

You could use git subrepos to link to the original vendor repo. That's a clean and practical solution.

The same goes to files that are meant to be edited, like config.php and the content directory.

In case you split up the project into a core and a deploying repo (like Kirby did), I think its not necessary anymore.

@dmelo
Copy link
Contributor Author

dmelo commented Apr 4, 2015

Hi @derhuerst . About git subrepos, I think it could be a solution. But composer already covers that. It would be redundant to manage the dependencies both through git submodule and composer. Moreover, composer is (in my opinion) far better choice for dependency management.

Given that you have chosen composer for dependency management, you don't need to keep your dependencies (even as submodules) inside your project. Projects like zf2 and apigility are good examples of how to use composer with git.

I'm not sure if I understood you last remark. The config.php is a file that the user must edit. But you don't want those changes to be tracked by the Pico repo. A good solution is to 1) create a config.php.template file, that is tracked by git and 2) list the config.php into the .gitignore. This way, the user can copy config.php.template to config.php and edit it, without get the changes tracked on Pico.

@dmelo
Copy link
Contributor Author

dmelo commented Apr 15, 2015

bump

@derhuerst
Copy link

I agree.

@dmelo
Copy link
Contributor Author

dmelo commented Apr 19, 2015

am I missing something? There are many open pull requests for this projects and the latest closed pull request is from February 2014. Is this project continuing on another fork, or something?

picocms added a commit that referenced this pull request Apr 21, 2015
Improve project organization
@picocms picocms merged commit 78a1db4 into picocms:master Apr 21, 2015
@theshka theshka mentioned this pull request Apr 28, 2015
@theshka theshka mentioned this pull request May 11, 2015
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

Successfully merging this pull request may close these issues.

3 participants