Gruntfile.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. module.exports = function(grunt) {
  2. grunt.initConfig({
  3. exec: {
  4. remove_logs: {
  5. command: 'rm -f *.log'
  6. , stdout: false
  7. , stderr: false
  8. }
  9. , list_files: {
  10. cmd: 'ls -l **'
  11. }
  12. , echo_grunt_version: {
  13. cmd: function() { return 'echo ' + this.version; }
  14. }
  15. , print_name: {
  16. cmd: function(firstName, lastName) {
  17. var formattedName = [
  18. lastName.toUpperCase()
  19. , firstName.toUpperCase()
  20. ].join(', ');
  21. return 'echo ' + formattedName;
  22. }
  23. }
  24. }
  25. , jshint: {
  26. options: {
  27. // enforcing options
  28. curly: true
  29. , forin: true
  30. , newcap: true
  31. , noarg: true
  32. , noempty: true
  33. , nonew: true
  34. , quotmark: true
  35. , undef: true
  36. , unused: true
  37. , trailing: true
  38. , maxlen: 80
  39. // relaxing options
  40. , boss: true
  41. , es5: true
  42. , expr: true
  43. , laxcomma: true
  44. // environments
  45. , node: true
  46. }
  47. , tasks: ['tasks/*.js']
  48. , tests: ['test/*.js']
  49. , gruntfile: ['Gruntfile.js']
  50. }
  51. });
  52. grunt.loadTasks('tasks');
  53. grunt.loadNpmTasks('grunt-contrib-jshint');
  54. grunt.registerTask('lint', 'jshint');
  55. };