GithubHelp home page GithubHelp logo

git-hooks's Introduction

!!! DEPRECATED !!!

Git hooks are now bundled with the claroline distribution. For installation instructions, see claroline/Distribution#739 (comment).

A collection of Git Hooks for Claroline Connect

pre-commit : One pre-commit to rule them all. pre-commit-phpcs : Run PHP_CodeSniffer on all your PHP files to be commited. (Depends on php-cs-fixer) pre-commit-jshint : Run JSHint on all your JavaScript files to be commited. (Depends on jshint) pre-commit-image-optimize : Run pngcrush and jpegtran on your PNG files and JPG files to be commited. (Depends on pngcrush and jpegtran) pre-commit-phpunit : Run PHPUnit. (Depends on PHPUnit)

Installing

Instructions are for installing on an Ubuntu/Debian based system.

Install php-cs-fixer

sudo curl http://get.sensiolabs.org/php-cs-fixer.phar -o php-cs-fixer
sudo chmod a+x php-cs-fixer
sudo mv php-cs-fixer /usr/local/bin/php-cs-fixer

Install jshint

sudo apt-get install nodejs
sudo npm install -g jshint

Install pngcrush and jpegtran

sudo apt-get install pngcrush
sudo apt-get install libjpeg-progs

Install phpunit

wget https://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
sudo mv phpunit.phar /usr/local/bin/phpunit

Usage

RTFM : Installing git hooks

The hooks are all stored in the hooks subdirectory of the Git directory. In most projects, that’s .git/hooks, so basicly copy all the needed hooks into your .git/hooks directory and make sure they are executable.

git-hooks's People

Contributors

laurentgruber avatar purplefish32 avatar stefk avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

carpas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.