Gruntfile.js 804 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. 'use strict';
  2. module.exports = function(grunt) {
  3. grunt.initConfig({
  4. jshint: {
  5. all: [
  6. 'Gruntfile.js',
  7. 'tasks/**/*.js'
  8. ],
  9. options: {
  10. jshintrc: '.jshintrc'
  11. }
  12. },
  13. // clear temporary dir
  14. clean: {
  15. test: ['tmp']
  16. },
  17. // apidoc configuration
  18. apidoc: {
  19. test: {
  20. src: 'test/fixtures',
  21. dest: 'tmp/',
  22. options: {
  23. debug: true,
  24. includeFilters: [ '.*\\.js$' ]
  25. }
  26. }
  27. }
  28. });
  29. // load plugins tasks
  30. grunt.loadTasks('tasks');
  31. // Tasks
  32. grunt.loadNpmTasks('grunt-contrib-jshint');
  33. grunt.loadNpmTasks('grunt-contrib-clean');
  34. // Tasks: Default
  35. grunt.registerTask('default', ['jshint']);
  36. // Tasks: Test
  37. grunt.registerTask('test', ['clean', 'apidoc']);
  38. };