Hacker News new | ask | show | jobs
by Udo 4469 days ago
Some of these are debatable.

> Don't store your vendor directory in Git! Completely unnecessary and waste of 47MB.

While 47MB is indeed a bit large, storing vendor libraries alongside your code makes sure you have a working version when you pull down the repo. Nothing more frustrating than hunting down why the code you just checked out doesn't work.

> Don't commit your asset directories (they should be symlinks).

That depends on what you mean by assets. If there are binary assets needed for the app to run, they must be included. Imagine downloading a web app with all the icons and textures missing. Not good. And if source files exist for these assets, they should be in the repo, too (like PSDs or Inkscape SVGs)

2 comments

All of my repo's have a 'build-dev' script in the root of the repository (see here: https://github.com/brightmarch/picto/blob/master/build-dev). Run that after you pull it down and it builds the environment for you (minus setting up Vagrant).

You should commit your asset files in the Bundle, but not the ones in web/bundles/ because those are created by copying or symlinking the assets in your Bundle.

or use composer, and commit composer.lock to ensure when composer install is run you'll get the dependency versions that are meant to ship with the release.