From dfc1fc75a4d7681b0ae01e450ed7b5e5d6eee336 Mon Sep 17 00:00:00 2001 From: Connor Clark Date: Mon, 31 Jan 2022 17:26:04 -0800 Subject: [PATCH 1/3] add sugar --- library/libraries.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/library/libraries.js b/library/libraries.js index fc41783..f33441d 100644 --- a/library/libraries.js +++ b/library/libraries.js @@ -1862,5 +1862,16 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = { return false; } + }, + 'Sugar': { + id: 'sugar', + icon: 'sugar', + url: 'https://sugarjs.com', + npm: 'sugar', + test: function (win) { + if (!win.Sugar) return false; + if (win.Sugar.VERSION) return { version: win.Sugar.VERSION }; + return { version: UNKNOWN_VERSION }; + } } }; From 2e0b0c48443e0545c1c3a368b9d6bfeee3cd9d1b Mon Sep 17 00:00:00 2001 From: Connor Clark Date: Mon, 31 Jan 2022 17:33:28 -0800 Subject: [PATCH 2/3] icon --- icons/sugar.png | Bin 0 -> 1289 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 icons/sugar.png diff --git a/icons/sugar.png b/icons/sugar.png new file mode 100644 index 0000000000000000000000000000000000000000..5a322a549fd7ae0129974bb7706a1d472a7a4065 GIT binary patch literal 1289 zcmV+k1@`)hP)9)s z?#Y{{z2Jc(2ku6~2@hoBA7J8 z-8cC%X*-=h&-Xs>k9j-5OJ?+czrf5f!!UBpoEL&$129G`#+W$^fgBj40I~pb0ERqY ztpcckpo39i;D|svLsf`LXQB#`(v_l$5JI;stCCKqbs|#NCUkaob|-A$& zDljWBGXNkGi9iSug3$O^Kzy1^CQDvIR4$kAkK7*q5dbl>1DK&y$B`8r4i_vM)sRdi z!ib)qlBv|Z>xC$QVNKwXl#=R(2`Ob?m$j@01PR3Bv7o*55i<{Ij_hs&h=@q^?el7_ zC82)Jw5$*aAyTi`hc(ALQ2?-|e8Z0`ODVz3AfjMJM?@Nc2ms-vWZw`dW{98(0p!Mz zONf0_wBi7hdyCNpLjG0|aL{oC;W-k8fxu@Uc|F8ZN>C_;(ch%dBBYpE_$0e<1ZT7p zVrHM?D0m-r67nz6h2bKzBZkONLLmiFds0x!w_@1bm|!=@>dbQNBZ6>}LX!};vYb*O z-Ot=m+V;I$;BY+jZyl172iZdaL^~m+2D}bIwZ#zo+Hf;CaLo~Scu0a-8(8-+H_@}V z^%-z$xr3UM9t?Kt;}Bx+4W3_w!tgdTwFMbq@675QM|zjev9j50bai$0^Qoz+kBR6` zuWXpjW|7Hc`UY&FLSya=Co)2WTho8UW);b00ruM@|iM$;EnregWXz z+1+ywa1%a(@pUlfkjnsY)0^c0K6loQcEA4sipn*UiT;6p00000NkvXXu0mjfT=!jP literal 0 HcmV?d00001 From feb1b4d0548d3212a4e4c8bb80393524de765892 Mon Sep 17 00:00:00 2001 From: Connor Clark Date: Mon, 31 Jan 2022 17:47:46 -0800 Subject: [PATCH 3/3] update --- library/libraries.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/library/libraries.js b/library/libraries.js index f33441d..3eeb660 100644 --- a/library/libraries.js +++ b/library/libraries.js @@ -1869,9 +1869,15 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = { url: 'https://sugarjs.com', npm: 'sugar', test: function (win) { - if (!win.Sugar) return false; - if (win.Sugar.VERSION) return { version: win.Sugar.VERSION }; - return { version: UNKNOWN_VERSION }; + if (win.Sugar) { + return { version: win.Sugar.VERSION || UNKNOWN_VERSION }; + } + + if (win.Array.SugarMethods) { + return { version: UNKNOWN_VERSION }; + } + + return false; } } };