init-dev-env.js 490 B

12345678910111213141516171819
  1. module.exports = function (grunt) {
  2. /**
  3. * Initialize development environment for Karma
  4. *
  5. * - register git hooks (commit-msg)
  6. */
  7. grunt.registerTask('init-dev-env', 'Initialize dev environment.', function () {
  8. var fs = require('fs')
  9. var done = this.async()
  10. fs.symlink('../../tasks/lib/validate-commit-msg.js', '.git/hooks/commit-msg', function (e) {
  11. if (!e) {
  12. grunt.log.ok('Hook "validate-commit-msg" installed.')
  13. }
  14. done()
  15. })
  16. })
  17. }