/*jshint node:true, es3:false*/

'use strict';

module.exports = function (task) {
    task
    .id('install')
    .name('Project installation')
    .author('Indigo United')
    .description('Install project dependencies')
    .option('force', 'Force fetching of remote sources', false)

    .setup(function (opts, ctx, next) {
        opts.trailCmd = opts.force ? ' -f' : '';
        next();
    })

    .do('cp', {
        description: 'Copying parameters.json',
        options: {
            files: {
                'app/config/parameters.json.dist': 'app/config/parameters.json'
            }
        }
    })
    .do('run', {
        description: 'Install client environment dependencies',
        options: {
            // TODO: bower should be called programatically?
            //       this would avoid having a global dependency on bower
            //       on the other hand.. its a good idea to force the user to install
            //       bower because it will be used as package manager for every project
            cmd: 'bower install{{trailCmd}}'
        }
    })
    .do('run', {
        description: 'Install node environment dependencies',
        options: {
            // TODO: should npm be called programatically?
            cmd: 'npm install{{trailCmd}}'
        }
    })
    .do('rm', {
        description: 'Cleanup files',
        options: {
            files: '.dejavurc'
        }
    });
};

@@ -1294,129 +1294,8 @@
   %7D%0A
-    %7D)%0A    .do('rm', %7B%0A        description: 'Cleanup files',%0A        options: %7B%0A            files: '.dejavurc'%0A        %7D%0A
     

Update install.js