Gruntfile.js 867 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*global module:false*/
  2. module.exports = function(grunt) {
  3. // Project configuration.
  4. grunt.initConfig({
  5. // Task configuration.
  6. eslint: {
  7. gruntfile: {
  8. src: 'Gruntfile.js'
  9. },
  10. lib_test: {
  11. src: ['jsfuck.js', 'lib/**/*.js', 'test/**/*.js']
  12. }
  13. },
  14. nodeunit: {
  15. files: ['test/**/*_test.js']
  16. },
  17. watch: {
  18. gruntfile: {
  19. files: '<%= eslint.gruntfile.src %>',
  20. tasks: ['eslint:gruntfile']
  21. },
  22. lib_test: {
  23. files: '<%= eslint.lib_test.src %>',
  24. tasks: ['eslint:lib_test', 'nodeunit']
  25. }
  26. }
  27. });
  28. // These plugins provide necessary tasks.
  29. grunt.loadNpmTasks('grunt-contrib-nodeunit');
  30. grunt.loadNpmTasks("gruntify-eslint");
  31. grunt.loadNpmTasks('grunt-contrib-watch');
  32. // Default task.
  33. grunt.registerTask('default', ['eslint', 'nodeunit']);
  34. };