Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
chialakarajesh opened this issue Sep 4, 2018 · 13 comments
Closed

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

chialakarajesh opened this issue Sep 4, 2018 · 13 comments

Comments

@chialakarajesh
Copy link

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
Copy link
Author

see for attached image
screenshot 5

@chialakarajesh
Copy link
Author

Im using gulp 3.9.1 and node 6.11.3 version

@TorusHelm
Copy link

Hi, can you show your gulpfile.js?

@chialakarajesh
Copy link
Author

chialakarajesh commented Sep 4, 2018

/* 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
Copy link
Author

new 2.txt

@chialakarajesh
Copy link
Author

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

@TorusHelm
Copy link

TorusHelm commented Sep 4, 2018 via email

@chialakarajesh
Copy link
Author

chialakarajesh commented Sep 5, 2018 via email

@TorusHelm
Copy link

TorusHelm commented Sep 5, 2018 via email

@TorusHelm
Copy link

TorusHelm commented Sep 5, 2018

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

@chialakarajesh
Copy link
Author

No..Im using bitbucket repository for my project

@chialakarajesh
Copy link
Author

chialakarajesh commented Sep 5, 2018 via email

@UlisesGascon
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants