@@ -16,8 +16,14 @@ const {
1616
1717const libraries = getLibraries ( ) ;
1818
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+ */
1925function makePackageTask ( library ) {
20- const packageFn = function ( ) {
26+ const packageFn = ( ) => {
2127 const resourceZipStream =
2228 library . manifest . resources && library . manifest . resources . length
2329 ? gulp
@@ -46,11 +52,17 @@ function makePackageTask(library) {
4652 } ;
4753
4854 packageFn . displayName = `Generate ${ library . name } _${ library . version } .zip` ;
55+
4956 return packageFn ;
5057}
5158
5259const defaultTask = gulp . parallel ( ...libraries . map ( makePackageTask ) ) ;
5360
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+ */
5466function outdated ( ) {
5567 const allUpgradesPromises = libraries . map ( library =>
5668 getUpgradeVersions ( library ) . then ( upgrades =>
@@ -76,8 +88,14 @@ ${formatPackageUpgrades(validUpgrades)}`);
7688 } ) ;
7789}
7890
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+ */
7997function makeUpgradeTask ( upgradeType ) {
80- const upgradeFn = function ( ) {
98+ const upgradeFn = ( ) => {
8199 const allUpgradesPromises = libraries . map ( library =>
82100 getUpgradeVersions ( library ) . then ( upgrades =>
83101 Object . assign ( library , { upgrades } )
0 commit comments