Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

42 lines
1.1KB

  1. 'use strict';
  2. module.exports = function(grunt) {
  3. // Project configuration.
  4. grunt.initConfig({
  5. jshint: {
  6. all: [
  7. 'Gruntfile.js',
  8. 'lib/*.js',
  9. '<%= nodeunit.tests %>',
  10. ],
  11. options: {
  12. jshintrc: '.jshintrc',
  13. },
  14. },
  15. // Before generating any new files, remove any previously-created files.
  16. clean: {
  17. tests: ['tmp'],
  18. },
  19. // Unit tests.
  20. nodeunit: {
  21. tests: ['test/*_test.js'],
  22. },
  23. });
  24. // These plugins provide necessary tasks.
  25. grunt.loadNpmTasks('grunt-contrib-jshint');
  26. grunt.loadNpmTasks('grunt-contrib-clean');
  27. grunt.loadNpmTasks('grunt-contrib-nodeunit');
  28. // Whenever the "test" task is run, first clean the "tmp" dir, then run this
  29. // plugin's task(s), then test the result.
  30. grunt.registerTask('test', ['clean', 'nodeunit']);
  31. // By default, lint and run all tests.
  32. grunt.registerTask('default', ['jshint', 'test']);
  33. };