Gruntfile.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. 'use strict';
  2. module.exports = function(grunt) {
  3. grunt.initConfig({
  4. pkg: grunt.file.readJSON('package.json'),
  5. jshint: {
  6. options: {
  7. globals: {
  8. 'require': true,
  9. 'define': true,
  10. 'module': true
  11. },
  12. trailing: true, // prevent trailing whitespace.
  13. curly: true,
  14. undef: true,
  15. unused: true,
  16. browser: true,
  17. es3: true // prevent trailing commas.
  18. },
  19. build: {
  20. files: {
  21. src: ['lib/**/*.js']
  22. }
  23. }
  24. },
  25. bump: {
  26. options: {
  27. files: ['package.json', 'bower.json'],
  28. updateConfigs: ['pkg'],
  29. commit: true,
  30. commitMessage: 'Release v%VERSION%',
  31. commitFiles: ['package.json', 'bower.json', 'CHANGELOG.md'], // '-a' for all files
  32. createTag: true,
  33. tagName: 'v%VERSION%',
  34. tagMessage: 'Version %VERSION%',
  35. push: true,
  36. pushTo: 'origin',
  37. gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d' // options to use with '$ git describe'
  38. }
  39. },
  40. });
  41. grunt.loadNpmTasks('grunt-contrib-jshint');
  42. grunt.loadNpmTasks('grunt-bump');
  43. grunt.loadNpmTasks('grunt-conventional-changelog');
  44. grunt.registerTask('default', ['build']);
  45. grunt.registerTask('build', ['jshint']);
  46. };