text: module.exports = function (grunt) {
  
    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-clean');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-html2js');
  
    // Default task.
    grunt.registerTask('default', ['build']);
    grunt.registerTask('build', ['clean','html2js','concat']);
  
    // Print a timestamp (useful for when watching)
    grunt.registerTask('timestamp', function() {
      grunt.log.subhead(Date());
    });
  
    // Project configuration.
    grunt.initConfig({
      distdir: 'dist',
      pkg: grunt.file.readJSON('package.json'),
      banner:
      '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' +
      '<%= pkg.homepage ? " * " + pkg.homepage + "\\n" : "" %>' +
      ' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author %>;\n' +
      ' * Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>\n */\n',
      src: {
        js: ['src/**/*.js', '<%= distdir %>/templates/**/*.js'],
        specs: ['test/**/*.spec.js'],
        scenarios: ['test/**/*.scenario.js'],
        html: ['src/index.html'],
        tpl: {
          app: ['src/app/**/*.tpl.html'],
          common: ['src/common/**/*.tpl.html']
        }
      },
      clean: ['<%= distdir %>/*'],
  
      html2js: {
        app: {
          options: {
            base: 'src/app'
          },
          src: ['<%= src.tpl.app %>'],
          dest: '<%= distdir %>/templates/app.js',
          module: 'templates.app'
        },
        common: {
          options: {
            base: 'src/common'
          },
          src: ['<%= src.tpl.common %>'],
          dest: '<%= distdir %>/templates/common.js',
          module: 'templates.common'
        }
      },
      concat:{
        dist:{
          options: {
            banner: "<%= banner %>"
          },
          src:['<%= src.js %>'],
          dest:'<%= distdir %>/<%= pkg.name %>.js'
        },
        angular: {
          src:['vendor/angular/*.js'],
          dest: '<%= distdir %>/angular-libs.js'
        }
      },
      watch:{
        all: {
          files:['<%= src.js %>', '<%= src.tpl.app %>'],
          tasks:['default']
        }
      }
    });
  
  };