Gruntfile.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. module.exports = function (grunt) {
  2. "use strict";
  3. // Project configuration.
  4. grunt.initConfig({
  5. pkg: grunt.file.readJSON("package.json"),
  6. meta: {
  7. banner: "/*!\n * <%= pkg.name %>\n * <%= pkg.description %>\n * @version <%= pkg.version %> - <%= grunt.template.today(\'yyyy-mm-dd\') %>\n * @author <%= pkg.author.name %> <<%= pkg.author.url %>>\n */\n"
  8. },
  9. jshint: {
  10. all: {
  11. src: ["lib/*.js", "test/*.js", "samples/**/*.js", "lib/resources/*.js"],
  12. options: {
  13. jshintrc: ".jshintrc"
  14. }
  15. }
  16. },
  17. simplemocha: {
  18. options: {
  19. timeout: 15000,
  20. reporter: 'dot'
  21. },
  22. all: {
  23. src: 'test/*.js'
  24. }
  25. },
  26. jsdoc : {
  27. dist : {
  28. src: ['lib/*'],
  29. jsdoc: './node_modules/.bin/jsdoc',
  30. options: {
  31. destination: 'docs/jsdoc/',
  32. configure: './node_modules/jsdoc/conf.json',
  33. template: './node_modules/ink-docstrap/template'
  34. }
  35. }
  36. }
  37. });
  38. // Load grunt tasks from npm packages
  39. grunt.loadNpmTasks("grunt-contrib-jshint");
  40. grunt.loadNpmTasks('grunt-simple-mocha');
  41. grunt.loadNpmTasks('grunt-jsdoc');
  42. // Test task
  43. grunt.registerTask("test", ["simplemocha"]);
  44. // Default task.
  45. grunt.registerTask("default", ["jshint", "simplemocha"]);
  46. };