From 2cadc0efd133cd165af727838eb1ca5deea36bf3 Mon Sep 17 00:00:00 2001 From: mikeller Date: Sun, 20 May 2018 13:11:36 +1200 Subject: [PATCH] Made coding style consistent, fixed registry error in 'package-lock.json'. --- gulpfile.js | 56 +++++++++++++++++++++++++++++++++++------------ package-lock.json | 50 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 88 insertions(+), 18 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 108b087b..636856e3 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -255,20 +255,28 @@ function listPostBuildTasks(folder, done) { var postBuildTasks = []; if (platforms.indexOf('linux32') != -1) { - postBuildTasks.push(function post_build_linux32(done){ return post_build('linux32', folder, done) }); + postBuildTasks.push(function post_build_linux32(done) { + return post_build('linux32', folder, done); + }); } if (platforms.indexOf('linux64') != -1) { - postBuildTasks.push(function post_build_linux64(done){ return post_build('linux64', folder, done) }); + postBuildTasks.push(function post_build_linux64(done) { + return post_build('linux64', folder, done); + }); } if (platforms.indexOf('armv7') != -1) { - postBuildTasks.push(function post_build_armv7(done){ return post_build('armv7', folder, done) }); + postBuildTasks.push(function post_build_armv7(done) { + return post_build('armv7', folder, done); + }); } // We need to return at least one task, if not gulp will throw an error if (postBuildTasks.length == 0) { - postBuildTasks.push(function post_build_none(done){ done() }); + postBuildTasks.push(function post_build_none(done) { + done(); + }); } return postBuildTasks; } @@ -491,7 +499,9 @@ function release_chromeos() { // Compress files from srcPath, using basePath, to outputFile in the RELEASE_DIR function compressFiles(srcPath, basePath, outputFile, zipFolder) { return gulp.src(srcPath, { base: basePath }) - .pipe(rename(function(actualPath){ actualPath.dirname = path.join(zipFolder, actualPath.dirname) })) + .pipe(rename(function(actualPath) { + actualPath.dirname = path.join(zipFolder, actualPath.dirname); + })) .pipe(zip(outputFile)) .pipe(gulp.dest(RELEASE_DIR)); } @@ -640,19 +650,33 @@ function listReleaseTasks(done) { } if (platforms.indexOf('linux64') !== -1) { - releaseTasks.push(function release_linux64_zip(){ return release_zip('linux64') }); - releaseTasks.push(function release_linux64_deb(done){ return release_deb('linux64', done) }); - releaseTasks.push(function release_linux64_rpm(done){ return release_rpm('linux64', done) }); + releaseTasks.push(function release_linux64_zip() { + return release_zip('linux64'); + }); + releaseTasks.push(function release_linux64_deb(done) { + return release_deb('linux64', done); + }); + releaseTasks.push(function release_linux64_rpm(done) { + return release_rpm('linux64', done); + }); } if (platforms.indexOf('linux32') !== -1) { - releaseTasks.push(function release_linux32_zip(){ return release_zip('linux32') }); - releaseTasks.push(function release_linux32_deb(done){ return release_deb('linux32', done) }); - releaseTasks.push(function release_linux32_rpm(done){ return release_rpm('linux32', done) }); + releaseTasks.push(function release_linux32_zip() { + return release_zip('linux32'); + }); + releaseTasks.push(function release_linux32_deb(done) { + return release_deb('linux32', done); + }); + releaseTasks.push(function release_linux32_rpm(done) { + return release_rpm('linux32', done); + }); } if (platforms.indexOf('armv7') !== -1) { - releaseTasks.push(function release_armv7_zip(){ return release_zip('armv7') }); + releaseTasks.push(function release_armv7_zip() { + return release_zip('armv7'); + }); } if (platforms.indexOf('osx64') !== -1) { @@ -660,11 +684,15 @@ function listReleaseTasks(done) { } if (platforms.indexOf('win32') !== -1) { - releaseTasks.push(function release_win32(done){ return release_win('win32', done) }); + releaseTasks.push(function release_win32(done) { + return release_win('win32', done); + }); } if (platforms.indexOf('win64') !== -1) { - releaseTasks.push(function release_win64(done){ return release_win('win64', done) }); + releaseTasks.push(function release_win64(done) { + return release_win('win64', done); + }); } return releaseTasks; diff --git a/package-lock.json b/package-lock.json index 5093e39a..474d56b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1661,6 +1661,26 @@ "readable-stream": "^2.0.4" } }, + "follow-redirects": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz", + "integrity": "sha512-fdrt472/9qQ6Kgjvb935ig6vJCuofpBUD14f9Vb+SLlm7xIe4Qva5gey8EKtv8lp7ahE1wilg3xL1znpVGtZIA==", + "dev": true, + "requires": { + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -1715,9 +1735,9 @@ "dev": true }, "fs-extra": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", - "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", + "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -2577,6 +2597,19 @@ "gulp-util": "^3.0.8", "through2": "^2.0.1", "title-case": "^2.1.0" + }, + "dependencies": { + "fs-extra": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", + "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + } } }, "gulp-install": { @@ -3512,7 +3545,7 @@ }, "lru_map": { "version": "0.3.3", - "resolved": "http://npm.chc.tlocal/lru_map/-/lru_map-0.3.3.tgz", + "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", "integrity": "sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0=" }, "make-iterator": { @@ -5351,6 +5384,15 @@ "xtend": "^4.0.0" } }, + "targz": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/targz/-/targz-1.0.1.tgz", + "integrity": "sha1-j3alI2lM3t+7XWCkB2/27uzFOY8=", + "dev": true, + "requires": { + "tar-fs": "^1.8.1" + } + }, "temp": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz",