farazdagi/phrozn — pull request #100 by Goutte (2013-10-26 07:53:53+00:00)
Title: Dusting up Copy

Hello !

First things first, I want to say that Phrozn is the most beautiful piece of PHP < 5.4 I ever had the honor and pleasure of hacking into. I tried to keep up with the code quality as much as I could.

There are a few changes into this branch, that can be resumed so :
- Cleanup of `DefaultSiteTest` and mockup project structure.
- Adding a `copy` option to `config.yml` in which you can specify any folder or file relative to the input directory. It allows for more flexibility where there was only the `media` folder.
- Tests for `copy` functionality (namely using a root favicon.ico -- some browsers don't like having a favicon in a subfolder, I'm not pointing fingers, you know who I'm talking about) ; we could also test with `robots.txt` or other fancy root files.
- Composerification of lessphp, textile and markdown parsers. I used the other PR about this.
- Fixs for some of the tests related to these vendors.
- Re-wrote the skipping logic to allow for non-skipped `foo-!SKIP!-bar.jpg`, and matching skip regexes against the pathname, not just the basename, so that we can skip whole folders.

There are some caveats :
- `media` folder is still hardcoded into copy, regardless of `config.yml`, in order to keep backward compatibility. Code is ready to evolve though (just delete two lines).
- lessphp is now stricter on its mixins, see the `.box-shadow` definition in `tests/Phrozn/Site/View/styles/style.less`.

There are some benefits :
- Phrozn is a lil' bit more awesome
- `robots.txt`, `humans.txt`, `favicon.ico`, `apple-touch-icon.png`, `.htaccess`, etc. !
- Relative `@imports` in less are fixed
- Processor Plugins work even if no `.phrozn` directory is present
- `rm -rf {$outputDir}` is now tagged DANGER ZONE ™
- I don't care if this is not pulled, I'm gonna use it anyway ;)

I'm looking into a minification Processor, did somebody have any luck with that ?