add docs for beforeHook
add build dir to .gitignore