yeoman / generator-webapp

A gulp.js generator for modern webapps
3.77k stars 708 forks source link

Gulp local execute to after 59 minutes... #726

Closed chialakarajesh closed 5 years ago

chialakarajesh commented 6 years ago

Im using windows 10 pro 64 bit system and when i ran gulp local it 'll take to complete 59 minutes to complete..Can any one suggested me how to reduce time and run gulp local very fast.

chialakarajesh commented 6 years ago

see for attached image screenshot 5

chialakarajesh commented 6 years ago

Im using gulp 3.9.1 and node 6.11.3 version

TorusHelm commented 6 years ago

Hi, can you show your gulpfile.js?

chialakarajesh commented 6 years ago
/* jshint node: true */

'use strict';

process.gulp_init_cwd = process.env.INIT_CWD || process.cwd();

var gulp = require('gulp')
,   package_manager = require('./gulp/package-manager')
,   path = require('path')
,   fs = require('fs')
,   _ = require('underscore')
,   args   = require('yargs').argv;

process.gulp_dest_distro = path.join(process.gulp_init_cwd, package_manager.distro.folders.distribution);
process.gulp_dest_deploy = path.join(process.gulp_init_cwd, package_manager.distro.folders.deploy);
process.gulp_dest = process.gulp_dest_distro;

//Store the relations between templates in SCL
process.dataTemplateDependencies = {}
//Delete the LocalDistribution folder in SCL, required by the "template" task
if(package_manager.distro.isSCLite)
{
    var del = require('del');
    del.sync([path.join(process.gulp_dest_distro, '**')]);
}

var baseTaskDir = path.resolve(__dirname, './gulp/tasks');
fs.readdirSync(baseTaskDir).forEach(function(task_name)
{
    if (/\.js/.test(task_name))
    {
        require(path.join(baseTaskDir, task_name.replace('.js', '')));
    }
});

var frontendDependencies = [
        'javascript'
    ,   'javascript-move'
    ,   'copy'
    ,   'less'
    ,   'sass'
    ,   'images'
    ,   'fonts'
    ,   'font-awesome'
    ,   'clean-templates'
    ,   'clean-sass-tmp'
    ];
var backendDependecies = []
if(!package_manager.distro.isSCLite || args.generateAllJavaScript)
{
    frontendDependencies.push('languages');
    backendDependecies = [
        'scripts'
    ,   'services'
    ,   'ssp-libraries'
    ,   'ssp-files'
    ,   'configuration'
    ];
}

gulp.task(
    'frontend'
,   frontendDependencies
);

gulp.task(
    'backend'
,   backendDependecies
);

gulp.task(
    'default'
,   [
        'backend'
    ,   'frontend'  

    ]

,   function ()
    {
        generateManifest();
    }
);

function generateManifest()
{
    var isDeploy = folderExists(package_manager.distro.folders.deploy); 
    var targetFolder = isDeploy ? package_manager.distro.folders.deploy : package_manager.distro.folders.distribution;

    var Uploader = require('ns-uploader');
    Uploader.prototype.buildLocalManifest(targetFolder)
    .then(function(localManifest)
    {
        if (!isDeploy)
        {
            var regex = new RegExp('^' + package_manager.distro.folders.distribution);
            _.each(localManifest, function(entry)
            {
                entry.path = entry.path.replace(regex, package_manager.distro.folders.deploy);
            });
        }
        fs.writeFileSync(path.join(targetFolder, Uploader.prototype.MANIFEST_FILE_NAME), JSON.stringify(localManifest));
    })
    .catch(function()
    {
        // ignore errors - we can still proceed without a manifest
    });
}

function folderExists(folder)
{
    try
    {
        return fs.lstatSync(folder).isDirectory();
    }
    catch (ex)
    {
        return false;
    }
}
chialakarajesh commented 6 years ago

new 2.txt

chialakarajesh commented 6 years ago

Please help me on this...My gulp local taking 1 hour to complete with admin access.

TorusHelm commented 6 years ago

can you give me your package.json? i'll try to do it in my pc

Вторник, 4 сентября 2018, 21:07 +05:00 от chialakarajesh notifications@github.com:

new 2.txt — You are receiving this because you commented. Reply to this email directly, view it on GitHub , or mute the thread .

С уважением,

torushelm@list.ru

chialakarajesh commented 6 years ago

Hi Please find attached file of Package.json.

Please let me know if you need anything.

Thanks,

Ch Rajesh.


From: Torus notifications@github.com Sent: Tuesday, September 4, 2018 9:39:43 PM To: yeoman/generator-webapp Cc: Rajesh, Chilaka; Author Subject: Re: [yeoman/generator-webapp] Gulp local execute to after 59 minutes... (#726)

can you give me your package.json? i'll try to do it in my pc

Вторник, 4 сентября 2018, 21:07 +05:00 от chialakarajesh notifications@github.com:

new 2.txt — You are receiving this because you commented. Reply to this email directly, view it on GitHub , or mute the thread .

С уважением,

torushelm@list.ru

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/yeoman/generator-webapp/issues/726#issuecomment-418426747, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AfQNj-zaAC9Wg9kLWI2GZW993oQ97_MZks5uXqXGgaJpZM4WY1zG. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

TorusHelm commented 6 years ago

Hi, do you use yeoman for web frontend development? only for creating project? or something else?

Среда, 5 сентября 2018, 12:33 +05:00 от chialakarajesh notifications@github.com:

Hi Please find attached file of Package.json.

Please let me know if you need anything.

Thanks,

Ch Rajesh.


From: Torus < notifications@github.com > Sent: Tuesday, September 4, 2018 9:39:43 PM To: yeoman/generator-webapp Cc: Rajesh, Chilaka; Author Subject: Re: [yeoman/generator-webapp] Gulp local execute to after 59 minutes... (#726)

can you give me your package.json? i'll try to do it in my pc

Вторник, 4 сентября 2018, 21:07 +05:00 от chialakarajesh < notifications@github.com >:

new 2.txt — You are receiving this because you commented. Reply to this email directly, view it on GitHub , or mute the thread .

С уважением,

torushelm@list.ru

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub< https://github.com/yeoman/generator-webapp/issues/726#issuecomment-418426747 >, or mute the thread< https://github.com/notifications/unsubscribe-auth/AfQNj-zaAC9Wg9kLWI2GZW993oQ97_MZks5uXqXGgaJpZM4WY1zG >. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. — You are receiving this because you commented. Reply to this email directly, view it on GitHub , or mute the thread .

torushelm@list.ru

TorusHelm commented 6 years ago

https://github.com/chialakarajesh/elbrus-js-demo.git this is your project? right? can you just open your project?

chialakarajesh commented 6 years ago

No..Im using bitbucket repository for my project

chialakarajesh commented 6 years ago

sorry for wrong file upload.Please find exact file of pacjage.json.

Thanks,

Ch Rajesh.


From: Rajesh, Chilaka Sent: Wednesday, September 5, 2018 1:03:24 PM To: yeoman/generator-webapp; yeoman/generator-webapp Cc: Author Subject: Re: [yeoman/generator-webapp] Gulp local execute to after 59 minutes... (#726)

Hi Please find attached file of Package.json.

Please let me know if you need anything.

Thanks,

Ch Rajesh.


From: Torus notifications@github.com Sent: Tuesday, September 4, 2018 9:39:43 PM To: yeoman/generator-webapp Cc: Rajesh, Chilaka; Author Subject: Re: [yeoman/generator-webapp] Gulp local execute to after 59 minutes... (#726)

can you give me your package.json? i'll try to do it in my pc

Вторник, 4 сентября 2018, 21:07 +05:00 от chialakarajesh notifications@github.com:

new 2.txt — You are receiving this because you commented. Reply to this email directly, view it on GitHub , or mute the thread .

С уважением,

torushelm@list.ru

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/yeoman/generator-webapp/issues/726#issuecomment-418426747, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AfQNj-zaAC9Wg9kLWI2GZW993oQ97_MZks5uXqXGgaJpZM4WY1zG. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

UlisesGascon commented 5 years ago

I assume that this bug was fixed in #737. If not we can re-open it again 😃