Gruntfile.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. module.exports = function ( grunt ) {
  2. 'use strict';
  3. /**
  4. * Requiring dependancies.
  5. */
  6. var
  7. path = require('path'),
  8. configs = require('load-grunt-config');
  9. /**
  10. * Defining paths to both configuration
  11. * and building tasks files.
  12. */
  13. var
  14. paths = {
  15. config : 'grunt/config',
  16. tasks : 'grunt/tasks'
  17. };
  18. /**
  19. * Reading `package.json` file for project info.
  20. */
  21. var
  22. pkg = grunt.file.readJSON('package.json');
  23. /**
  24. * Generating project banner.
  25. */
  26. var
  27. banner = '/*!\n' +
  28. ' * <%= pkg.name %> v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
  29. ' * Copyright <%= grunt.template.today("yyyy") %> "<%= pkg.author.name %>"\n' +
  30. ' * Licensed under MIT License.\n' +
  31. ' */\n';
  32. /**
  33. * Itializing Grunt tasks.
  34. */
  35. configs(grunt, {
  36. configPath : path.join( process.cwd(), paths.config ),
  37. jitGrunt : {
  38. customTasksDir : paths.tasks
  39. },
  40. data: {
  41. paths : paths,
  42. pkg : pkg,
  43. banner : banner
  44. }
  45. });
  46. };