I've had to make a few changes several times to different whippet-generated themes so I thought I'd make a PR here so that I don't have to make those changes again. And while I'm at it I may as well make some other improvements.
PHP:
[x] Add composer support
[x] Add autoloading
[x] Add test skeletons
[x] Namespace all non-template code (it all lives in the same place as before, except that names have been capitalised to conform to namespace/class conventions)
[x] Add a .travis.yml file to run vendor/bin/phpunit and php-cs-fixer
[x] Replace existing pagination with dxw/pagination
Above: see #6
[ ] Write tests for everything in app - see #7
[ ] Move some code under app into a separate repo (???) - see #7
Assets:
[ ] Use browserify in grunt so developers don't need to modify Gruntfile.js to add things to the compiled JS - see #8
[ ] Remove --env option from Gruntfile.js (or at least make production the default) - until the server can run grunt --env=production, having this option is just too confusing - see #9
Structural changes:
[ ] Move the boilerplate at the top of app/functions.php into templates/functions.php and move all the initialisation into \MyTheme\Functions::register(); (???) - see #10
[ ] Move all compiled files into build/ (???) - not sure if this is still an issue
Style changes:
[ ] Remove semicolons from templates (i.e. <?php x(); ?>) - this probably doesn't deserve an issue creating
I've had to make a few changes several times to different whippet-generated themes so I thought I'd make a PR here so that I don't have to make those changes again. And while I'm at it I may as well make some other improvements.
PHP:
Above: see #6
app
- see #7app
into a separate repo (???) - see #7Assets:
grunt --env=production
, having this option is just too confusing - see #9Structural changes:
\MyTheme\Functions::register();
(???) - see #10Style changes:
<?php x(); ?>
) - this probably doesn't deserve an issue creating