Gruntfile.js 937 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* License: MIT.
  2. * Copyright (C) 2013, 2014, 2015, Uri Shaked.
  3. */
  4. 'use strict';
  5. module.exports = function (grunt) {
  6. // Load grunt tasks automatically
  7. require('load-grunt-tasks')(grunt);
  8. grunt.initConfig({
  9. karma: {
  10. unit: {
  11. configFile: 'karma.conf.js',
  12. singleRun: true
  13. }
  14. },
  15. jshint: {
  16. options: {
  17. jshintrc: '.jshintrc'
  18. },
  19. all: [
  20. 'Gruntfile.js',
  21. 'angular-moment.js',
  22. 'tests.js'
  23. ]
  24. },
  25. uglify: {
  26. dist: {
  27. options: {
  28. sourceMap: true
  29. },
  30. files: {
  31. 'angular-moment.min.js': 'angular-moment.js'
  32. }
  33. }
  34. },
  35. ngdocs: {
  36. options: {
  37. startPage: '/',
  38. title: false,
  39. html5Mode: false
  40. },
  41. api: {
  42. src: 'angular-moment.js',
  43. title: 'angular-moment API Documentation'
  44. }
  45. }
  46. });
  47. grunt.registerTask('test', [
  48. 'jshint',
  49. 'karma'
  50. ]);
  51. grunt.registerTask('build', [
  52. 'jshint',
  53. 'uglify'
  54. ]);
  55. grunt.registerTask('default', ['build']);
  56. };