@@ -16,8 +16,14 @@ const {
16
16
17
17
const libraries = getLibraries ( ) ;
18
18
19
+ /**
20
+ * Creates a Gulp task function to package the given library
21
+ *
22
+ * @param {Library } library - A library object
23
+ * @returns {Task } A Gulp task function
24
+ */
19
25
function makePackageTask ( library ) {
20
- const packageFn = function ( ) {
26
+ const packageFn = ( ) => {
21
27
const resourceZipStream =
22
28
library . manifest . resources && library . manifest . resources . length
23
29
? gulp
@@ -46,11 +52,17 @@ function makePackageTask(library) {
46
52
} ;
47
53
48
54
packageFn . displayName = `Generate ${ library . name } _${ library . version } .zip` ;
55
+
49
56
return packageFn ;
50
57
}
51
58
52
59
const defaultTask = gulp . parallel ( ...libraries . map ( makePackageTask ) ) ;
53
60
61
+ /**
62
+ * A Gulp task to output a table of outdated libraries
63
+ *
64
+ * @returns {Promise } A promise which resolves when the outdated table is complete
65
+ */
54
66
function outdated ( ) {
55
67
const allUpgradesPromises = libraries . map ( library =>
56
68
getUpgradeVersions ( library ) . then ( upgrades =>
@@ -76,8 +88,14 @@ ${formatPackageUpgrades(validUpgrades)}`);
76
88
} ) ;
77
89
}
78
90
91
+ /**
92
+ * Creates a Gulp task function to upgrade libraries
93
+ *
94
+ * @param {string } upgradeType - patch, minor, or major
95
+ * @returns {Task } A Gulp task function
96
+ */
79
97
function makeUpgradeTask ( upgradeType ) {
80
- const upgradeFn = function ( ) {
98
+ const upgradeFn = ( ) => {
81
99
const allUpgradesPromises = libraries . map ( library =>
82
100
getUpgradeVersions ( library ) . then ( upgrades =>
83
101
Object . assign ( library , { upgrades } )
0 commit comments