module.exports = function ( grunt ) { 'use strict'; /** * Requiring dependancies. */ var path = require('path'), configs = require('load-grunt-config'); /** * Defining paths to both configuration * and building tasks files. */ var paths = { config : 'grunt/config', tasks : 'grunt/tasks' }; /** * Reading `package.json` file for project info. */ var pkg = grunt.file.readJSON('package.json'); /** * Generating project banner. */ var banner = '/*!\n' + ' * <%= pkg.name %> v<%= pkg.version %> (<%= pkg.homepage %>)\n' + ' * Copyright <%= grunt.template.today("yyyy") %> "<%= pkg.author.name %>"\n' + ' * Licensed under MIT License.\n' + ' */\n'; /** * Itializing Grunt tasks. */ configs(grunt, { configPath : path.join( process.cwd(), paths.config ), jitGrunt : { customTasksDir : paths.tasks }, data: { paths : paths, pkg : pkg, banner : banner } }); };