/*
 * Rules to build the application.
 *
 * (c) 2016 Sanjeev Premi (spremi@ymail.com)
 *
 * SPDX-License-Identifier: BSD-3-Clause
 *                          (http://spdx.org/licenses/BSD-3-Clause.html)
 *
 */


'use strict';


module.exports = function (grunt) {

  //
  // Read project configuration
  //
  var pkgInfo = grunt.file.readJSON('package.json');

  //
  // Configure the tasks
  //
  grunt.initConfig({
    //
    // Project information
    //
    pkg: pkgInfo,
  });


  //
  // Task: Show banner
  //
  grunt.registerTask('banner', 'Show banner',
    function() {

      var str = ':::'['yellow'] + '\n' +
                '::: Building '['yellow'] + pkgInfo.name['magenta'] +
                    ' version '['yellow'] + pkgInfo.version['cyan'] + '\n' +
                ':::'['yellow'];

      grunt.log.writeln(str);
    });

  //
  // Default task
  //
  grunt.registerTask('default', [
    'banner'
  ]);
};

@@ -468,16 +468,230 @@
 pkgInfo,
+%0A%0A    //%0A    // Project environment%0A    //%0A    env: %7B%0A      dev: %7B%0A        NODE_ENV: 'development'%0A      %7D,%0A      test: %7B%0A        NODE_ENV: 'test'%0A      %7D,%0A      prod: %7B%0A        NODE_ENV: 'production'%0A      %7D%0A    %7D
 %0A  %7D);%0A%0A

Initialize build configuration