/**
 * Created by anonymoussc on 08/03/15 20:40.
 */

'use strict';

var moment   = require('moment'),
    S        = require('string'),
    argv     = require('yargs').argv,
    dataSrc  = require('./../config/dataSrc/dataSrc.json'),
    config   = require('./../config/config.js'),
    league   = require('./templates/league.js'),
    composer = require('./templates/composer.js'),
    laravel  = require('./templates/laravel.js'),
    ngApps   = require('./templates/ngApps.js'),
    ngApp    = require('./templates/ngApp.js');

var
    precompile = {
        dataSrc : {
            author_name        : dataSrc.author_name,
            author_username    : whos_yousername(),//dataSrc.author_username,
            author_website     : dataSrc.author_website,
            author_email       : dataSrc.author_email,
            package_name       : dataSrc.package_name,
            package_description: dataSrc.package_description,
            dateTime           : {
                now : moment().format('MMMM Do YYYY, h:mm:ss a'),
                year: moment().format('YYYY')
            },
            author_username_ucf: S(whos_yousername()).capitalize().s, // Upper case first letter
            author_username_sc : S('-' + whos_yousername()).camelize().s, // StudlyCaps
            author_username_cc : S(whos_yousername()).camelize().s, // camelCase
            author_username_alt: whos_yousername(true),
            package_name_ucf   : S(dataSrc.package_name).capitalize().s, // Upper case first letter
            package_name_sc    : S('-' + dataSrc.package_name).camelize().s, // StudlyCaps
            package_name_cc    : S(dataSrc.package_name).camelize().s // camelCase
        },
        config  : config,
        appbase : '',
        composer: composer,
        laravel : laravel,
        league  : league,
        ngApps  : ngApps,
        ngApp   : ngApp,
        webapps : ''
    };

function whos_yousername(alt) {
    argv.generator = argv.g ? argv.g : argv.generator;

    if ((argv.generator == league.name) || (config.generator == league.name)) {
        if (((argv.generator == league.name) && (!config.generator)) || ((config.generator == league.name) && (!argv.generator))) {
            if (alt) {
                return 'thephpleague';
            }
            return league.name;
        }
    }
    else {
        return dataSrc.author_username;
    }

}

module.exports = precompile;

// filePath, fileName, fileDestination
@@ -295,32 +295,35 @@
    = require('./
+../
 templates/league
@@ -347,32 +347,35 @@
 er = require('./
+../
 templates/compos
@@ -401,32 +401,35 @@
 l  = require('./
+../
 templates/larave
@@ -454,32 +454,35 @@
    = require('./
+../
 templates/ngApps
@@ -514,16 +514,19 @@
 uire('./
+../
 template
@@ -688,16 +688,17 @@
 rname(),
+ 
 //dataSr
@@ -710,25 +710,24 @@
 hor_username
-,
 %0A           
@@ -1743,30 +1743,8 @@
 ig,%0A
-        appbase : '',%0A
     
@@ -1873,30 +1873,8 @@
 gApp
-,%0A        webapps : ''
 %0A   
@@ -1984,32 +1984,33 @@
 rgv.generator ==
+=
  league.name) %7C%7C
@@ -2022,32 +2022,33 @@
 fig.generator ==
+=
  league.name)) %7B
@@ -2071,32 +2071,33 @@
 rgv.generator ==
+=
  league.name) &&
@@ -2142,16 +2142,17 @@
 rator ==
+=
  league.
@@ -2305,20 +2305,16 @@
  %7D%0A    %7D
-%0A   
  else %7B%0A
@@ -2363,16 +2363,16 @@
   %7D%0A%0A%7D%0A%0A
+
 module.e
@@ -2395,44 +2395,4 @@
 ile;
-%0A%0A// filePath, fileName, fileDestination

Update precompile.js