From bb928899b4915d160fdad18b3ab02e88aa7f0630 Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Tue, 12 Nov 2024 06:58:48 -0800 Subject: [PATCH] Use Jekyll plugin rather than preprocessing shenanigans to sort versions --- README.md | 4 - _api/2.6/global.html | 3 +- _api/2.7/global.html | 3 +- _api/2.8/global.html | 3 +- _api/2.9/global.html | 3 +- _api/3.0/global.html | 1 - _api/3.1/global.html | 3 +- _api/3.10/global.html | 3 +- _api/3.2/global.html | 3 +- _api/3.3/global.html | 3 +- _api/3.4/global.html | 3 +- _api/3.5/global.html | 3 +- _api/3.6/global.html | 3 +- _api/3.7/global.html | 3 +- _api/3.8/global.html | 3 +- _api/3.9/global.html | 1 - _api/4.0/global.html | 1 - _api/4.1/global.html | 1 - _api/4.2/global.html | 1 - _api/4.3/global.html | 1 - _api/4.4/global.html | 3 +- _api/4.5/global.html | 3 +- _api/4.6/global.html | 3 +- _api/4.6/jasmine.html | 3 +- _api/5.0.0-alpha.0/global.html | 3 +- _api/5.0.0-alpha.1/global.html | 3 +- _api/5.0.0-beta.0/global.html | 3 +- _api/5.0/global.html | 3 +- _api/5.1/global.html | 1 - _api/5.2/global.html | 3 +- _api/5.3/global.html | 3 +- _api/5.4/global.html | 1 - _api/edge/global.html | 3 +- .../0.10.0/module-jasmine-browser-runner.html | 1 - .../0.6.0/module-jasmine-browser-runner.html | 3 +- .../0.7.0/module-jasmine-browser-runner.html | 3 +- .../0.8.0/module-jasmine-browser-runner.html | 3 +- .../0.9.0/module-jasmine-browser-runner.html | 1 - .../1.0/module-jasmine-browser-runner.html | 3 +- .../1.4/module-jasmine-browser-runner.html | 3 +- .../module-jasmine-browser-runner.html | 3 +- .../2.0/module-jasmine-browser-runner.html | 3 +- .../2.1/module-jasmine-browser-runner.html | 3 +- .../2.2/module-jasmine-browser-runner.html | 3 +- .../2.3/module-jasmine-browser-runner.html | 3 +- .../2.4/module-jasmine-browser-runner.html | 3 +- .../2.5/module-jasmine-browser-runner.html | 1 - .../module-jasmine-browser-runner.html | 3 +- .../edge/module-jasmine-browser-runner.html | 3 +- _npm-api/3.10/Jasmine.html | 3 +- _npm-api/3.8/Jasmine.html | 3 +- _npm-api/3.9/Jasmine.html | 1 - _npm-api/4.0/Jasmine.html | 1 - _npm-api/4.1/Jasmine.html | 1 - _npm-api/4.2/Jasmine.html | 1 - _npm-api/4.3/Jasmine.html | 1 - _npm-api/4.4/Jasmine.html | 3 +- _npm-api/4.5/Jasmine.html | 3 +- _npm-api/4.6/Jasmine.html | 3 +- _npm-api/5.0.0-alpha.0/Jasmine.html | 3 +- _npm-api/5.0.0-alpha.1/Jasmine.html | 3 +- _npm-api/5.0.0-beta.0/Jasmine.html | 3 +- _npm-api/5.0/Jasmine.html | 3 +- _npm-api/5.1/Jasmine.html | 1 - _npm-api/5.2/Jasmine.html | 3 +- _npm-api/5.3/Jasmine.html | 3 +- _npm-api/5.4/Jasmine.html | 1 - _npm-api/edge/Jasmine.html | 3 +- _plugins/SortByVersion.rb | 32 ++++++++ package.json | 3 - pages/archives.html | 6 +- pages/docs_home.html | 6 +- src/jsdoc-tools/asciibeticalVersion.js | 34 --------- src/jsdoc-tools/asciibeticalVersionSpec.js | 74 ------------------- src/jsdoc-tools/makeSortable.js | 26 ------- src/jsdoc-tools/spec/support/jasmine.json | 7 -- 76 files changed, 87 insertions(+), 270 deletions(-) create mode 100644 _plugins/SortByVersion.rb delete mode 100644 src/jsdoc-tools/asciibeticalVersion.js delete mode 100644 src/jsdoc-tools/asciibeticalVersionSpec.js delete mode 100755 src/jsdoc-tools/makeSortable.js delete mode 100644 src/jsdoc-tools/spec/support/jasmine.json diff --git a/README.md b/README.md index d98526f3..79b90365 100644 --- a/README.md +++ b/README.md @@ -81,10 +81,6 @@ To archive an old tutorial: - Update the edge API docs as described in the previous section - Copy the edge docs to the new version for each package, e.g. `cp -r _api/edge _api/4.4` -- Set the sort key in `_api//global.html>`, `_npm-api/Jasmine.html`, - and/or `_browser-runner-api/module-jasmine-browser-runner.html`. The sort key - should be a string with three digits for the major and minor versions, e.g. - "004.003" for version 4.3. - Archive the oldest non-archived version by adding `archived: true` to `_api//global.html>`, `_npm-api/Jasmine.html`, and/or `_browser-runner-api/module-jasmine-browser-runner.html`. This will remove the diff --git a/_api/2.6/global.html b/_api/2.6/global.html index eed73b0e..a9eaa896 100644 --- a/_api/2.6/global.html +++ b/_api/2.6/global.html @@ -4,7 +4,6 @@ prettify: true archived: true omit_docco: true -sortKey: "002.006" ---
@@ -2731,4 +2730,4 @@
Parameters:
Documentation generated by JSDoc 3.4.3 on Thu Mar 23 2017 16:53:16 GMT-0700 (PDT)
-
\ No newline at end of file + diff --git a/_api/2.7/global.html b/_api/2.7/global.html index 6af98fe9..99e93343 100644 --- a/_api/2.7/global.html +++ b/_api/2.7/global.html @@ -4,7 +4,6 @@ prettify: true archived: true omit_docco: true -sortKey: "002.007" ---
@@ -2731,4 +2730,4 @@
Parameters:
Documentation generated by JSDoc 3.4.3 on Sat Jul 29 2017 14:21:54 GMT-0700 (PDT)
-
\ No newline at end of file + diff --git a/_api/2.8/global.html b/_api/2.8/global.html index 0bc31aed..ba594747 100644 --- a/_api/2.8/global.html +++ b/_api/2.8/global.html @@ -4,7 +4,6 @@ prettify: true archived: true omit_docco: true -sortKey: "002.008" ---
@@ -3875,4 +3874,4 @@
Properties:
Documentation generated by JSDoc 3.5.4 on Thu Aug 24 2017 12:23:17 GMT-0700 (PDT)
-
\ No newline at end of file + diff --git a/_api/2.9/global.html b/_api/2.9/global.html index ebd404a9..1e71d48d 100644 --- a/_api/2.9/global.html +++ b/_api/2.9/global.html @@ -4,7 +4,6 @@ prettify: true archived: true omit_docco: true -sortKey: "002.009" ---
@@ -3875,4 +3874,4 @@
Properties:
Documentation generated by JSDoc 3.5.4 on Wed Jan 17 2018 17:46:19 GMT-0800 (PST)
-
\ No newline at end of file + diff --git a/_api/3.0/global.html b/_api/3.0/global.html index 58ec5681..da4b439c 100644 --- a/_api/3.0/global.html +++ b/_api/3.0/global.html @@ -4,7 +4,6 @@ prettify: true archived: true omit_docco: true -sortKey: "003.000" ---
diff --git a/_api/3.1/global.html b/_api/3.1/global.html index 4ccb37bd..b6240ebc 100644 --- a/_api/3.1/global.html +++ b/_api/3.1/global.html @@ -4,7 +4,6 @@ prettify: true archived: true omit_docco: true -sortKey: "003.001" ---
@@ -3990,4 +3989,4 @@
Properties:
Documentation generated by JSDoc 3.5.5 on Tue Aug 14 2018 17:31:37 GMT-0700 (PDT)
-
\ No newline at end of file +
diff --git a/_api/3.10/global.html b/_api/3.10/global.html index 7360c726..b9d2d861 100644 --- a/_api/3.10/global.html +++ b/_api/3.10/global.html @@ -4,7 +4,6 @@ prettify: true archived: true omit_docco: true -sortKey: "003.010" ---
@@ -5357,4 +5356,4 @@
Properties:
-
\ No newline at end of file + diff --git a/_api/3.2/global.html b/_api/3.2/global.html index 6304d7e8..430353dc 100644 --- a/_api/3.2/global.html +++ b/_api/3.2/global.html @@ -4,7 +4,6 @@ prettify: true archived: true omit_docco: true -sortKey: "003.002" ---
@@ -4342,4 +4341,4 @@
Properties:
Documentation generated by JSDoc 3.5.5 on Tue Aug 14 2018 17:12:27 GMT-0700 (PDT)
-
\ No newline at end of file + diff --git a/_api/3.3/global.html b/_api/3.3/global.html index ea2aaa39..e2e0685d 100644 --- a/_api/3.3/global.html +++ b/_api/3.3/global.html @@ -4,7 +4,6 @@ prettify: true archived: true omit_docco: true -sortKey: "003.003" ---
@@ -4342,4 +4341,4 @@
Properties:
Documentation generated by JSDoc 3.5.5 on Thu Oct 25 2018 09:59:15 GMT-0700 (PDT)
-
\ No newline at end of file + diff --git a/_api/3.4/global.html b/_api/3.4/global.html index c119e928..f711cfde 100644 --- a/_api/3.4/global.html +++ b/_api/3.4/global.html @@ -4,7 +4,6 @@ prettify: true archived: true omit_docco: true -sortKey: "003.004" ---
@@ -4388,4 +4387,4 @@
Properties:
Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 17:10:06 GMT-0700 (Pacific Daylight Time)
-
\ No newline at end of file + diff --git a/_api/3.5/global.html b/_api/3.5/global.html index 53b77bb6..63bf08fe 100644 --- a/_api/3.5/global.html +++ b/_api/3.5/global.html @@ -4,7 +4,6 @@ prettify: true archived: true omit_docco: true -sortKey: "003.005" ---
@@ -4498,4 +4497,4 @@
Properties:
Documentation generated by JSDoc 3.6.3 on Mon Sep 23 2019 16:24:45 GMT-0700 (Pacific Daylight Time)
-
\ No newline at end of file + diff --git a/_api/3.6/global.html b/_api/3.6/global.html index 2322beed..0ca8088a 100644 --- a/_api/3.6/global.html +++ b/_api/3.6/global.html @@ -4,7 +4,6 @@ prettify: true archived: true omit_docco: true -sortKey: "003.006" ---
@@ -4863,4 +4862,4 @@
Properties:
Documentation generated by JSDoc 3.6.3 on Thu Jul 23 2020 16:37:45 GMT-0700 (Pacific Daylight Time)
-
\ No newline at end of file + diff --git a/_api/3.7/global.html b/_api/3.7/global.html index e218a7c2..46fa7b7a 100644 --- a/_api/3.7/global.html +++ b/_api/3.7/global.html @@ -4,7 +4,6 @@ prettify: true archived: true omit_docco: true -sortKey: "003.007" ---
@@ -4863,4 +4862,4 @@
Properties:
Documentation generated by JSDoc 3.6.5 on Wed Mar 17 2021 19:19:14 GMT-0700 (Pacific Daylight Time)
-
\ No newline at end of file + diff --git a/_api/3.8/global.html b/_api/3.8/global.html index 747c3cc2..057cd316 100644 --- a/_api/3.8/global.html +++ b/_api/3.8/global.html @@ -2,7 +2,6 @@ layout: default title: "Global" prettify: true -sortKey: "003.008" archived: true omit_docco: true --- @@ -5029,4 +5028,4 @@
Properties:
Documentation generated by JSDoc 3.6.3 on Thu Jul 01 2021 16:50:49 GMT-0700 (Pacific Daylight Time)
- \ No newline at end of file + diff --git a/_api/3.9/global.html b/_api/3.9/global.html index 84a177af..ec487357 100644 --- a/_api/3.9/global.html +++ b/_api/3.9/global.html @@ -4,7 +4,6 @@ prettify: true omit_docco: true archived: true -sortKey: "003.009" ---
diff --git a/_api/4.0/global.html b/_api/4.0/global.html index ee0496dc..6d2cbded 100644 --- a/_api/4.0/global.html +++ b/_api/4.0/global.html @@ -3,7 +3,6 @@ title: "Global" prettify: true omit_docco: true -sortKey: "004.000" archived: true --- diff --git a/_api/4.1/global.html b/_api/4.1/global.html index 93feb7f7..6d2cbded 100644 --- a/_api/4.1/global.html +++ b/_api/4.1/global.html @@ -3,7 +3,6 @@ title: "Global" prettify: true omit_docco: true -sortKey: "004.001" archived: true --- diff --git a/_api/4.2/global.html b/_api/4.2/global.html index 00472d10..6d2cbded 100644 --- a/_api/4.2/global.html +++ b/_api/4.2/global.html @@ -3,7 +3,6 @@ title: "Global" prettify: true omit_docco: true -sortKey: "004.002" archived: true --- diff --git a/_api/4.3/global.html b/_api/4.3/global.html index c9bb808f..6d2cbded 100644 --- a/_api/4.3/global.html +++ b/_api/4.3/global.html @@ -3,7 +3,6 @@ title: "Global" prettify: true omit_docco: true -sortKey: "004.003" archived: true --- diff --git a/_api/4.4/global.html b/_api/4.4/global.html index 9ea2df14..6d2cbded 100644 --- a/_api/4.4/global.html +++ b/_api/4.4/global.html @@ -3,7 +3,6 @@ title: "Global" prettify: true omit_docco: true -sortKey: "004.004" archived: true --- @@ -5224,4 +5223,4 @@
Properties:
-
\ No newline at end of file + diff --git a/_api/4.5/global.html b/_api/4.5/global.html index 39200f0e..1810927d 100644 --- a/_api/4.5/global.html +++ b/_api/4.5/global.html @@ -3,7 +3,6 @@ title: "Global" prettify: true omit_docco: true -sortKey: "004.005" archived: true --- @@ -5224,4 +5223,4 @@
Properties:
- \ No newline at end of file + diff --git a/_api/4.6/global.html b/_api/4.6/global.html index 1bf24a18..3eb2557a 100644 --- a/_api/4.6/global.html +++ b/_api/4.6/global.html @@ -3,7 +3,6 @@ title: "Global" prettify: true omit_docco: true -sortKey: "004.006" archived: true --- @@ -5322,4 +5321,4 @@
Properties:
- \ No newline at end of file + diff --git a/_api/4.6/jasmine.html b/_api/4.6/jasmine.html index 3d6f385b..cc634a13 100644 --- a/_api/4.6/jasmine.html +++ b/_api/4.6/jasmine.html @@ -3,7 +3,6 @@ title: "Namespace: jasmine" prettify: true omit_docco: true -sortKey: "004.006" ---
@@ -4017,4 +4016,4 @@

(static) truth -

\ No newline at end of file + diff --git a/_api/5.0.0-alpha.0/global.html b/_api/5.0.0-alpha.0/global.html index 7359b5a0..915a8976 100644 --- a/_api/5.0.0-alpha.0/global.html +++ b/_api/5.0.0-alpha.0/global.html @@ -3,7 +3,6 @@ title: "Global" prettify: true omit_docco: true -sortKey: "005.000.0-alpha.000" archived: true --- @@ -5391,4 +5390,4 @@
Properties:
- \ No newline at end of file + diff --git a/_api/5.0.0-alpha.1/global.html b/_api/5.0.0-alpha.1/global.html index 559a337d..2fe698d0 100644 --- a/_api/5.0.0-alpha.1/global.html +++ b/_api/5.0.0-alpha.1/global.html @@ -3,7 +3,6 @@ title: "Global" prettify: true omit_docco: true -sortKey: "005.000.0-alpha.001" archived: true --- @@ -5391,4 +5390,4 @@
Properties:
- \ No newline at end of file + diff --git a/_api/5.0.0-beta.0/global.html b/_api/5.0.0-beta.0/global.html index 93e5db8d..2fe698d0 100644 --- a/_api/5.0.0-beta.0/global.html +++ b/_api/5.0.0-beta.0/global.html @@ -3,7 +3,6 @@ title: "Global" prettify: true omit_docco: true -sortKey: "005.000.0-beta.000" archived: true --- @@ -5391,4 +5390,4 @@
Properties:
- \ No newline at end of file + diff --git a/_api/5.0/global.html b/_api/5.0/global.html index fcb572c0..ac4e6f71 100644 --- a/_api/5.0/global.html +++ b/_api/5.0/global.html @@ -3,7 +3,6 @@ title: "Global" prettify: true omit_docco: true -sortKey: "005.000" archived: true --- @@ -5391,4 +5390,4 @@
Properties:
- \ No newline at end of file + diff --git a/_api/5.1/global.html b/_api/5.1/global.html index 7a083a0a..f5068ed2 100644 --- a/_api/5.1/global.html +++ b/_api/5.1/global.html @@ -2,7 +2,6 @@ layout: default title: "Global" prettify: true -sortKey: "005.001" archived: true --- diff --git a/_api/5.2/global.html b/_api/5.2/global.html index cc4500c7..86f9e014 100644 --- a/_api/5.2/global.html +++ b/_api/5.2/global.html @@ -2,7 +2,6 @@ layout: default title: "Global" prettify: true -sortKey: "005.002" archived: true --- @@ -5748,4 +5747,4 @@
Properties:
Documentation generated by JSDoc.
- \ No newline at end of file + diff --git a/_api/5.3/global.html b/_api/5.3/global.html index 349eb024..87452b5c 100644 --- a/_api/5.3/global.html +++ b/_api/5.3/global.html @@ -2,7 +2,6 @@ layout: default title: "Global" prettify: true -sortKey: "005.003" ---
@@ -5747,4 +5746,4 @@
Properties:
Documentation generated by JSDoc.
-
\ No newline at end of file + diff --git a/_api/5.4/global.html b/_api/5.4/global.html index 3a1f770b..500784f3 100644 --- a/_api/5.4/global.html +++ b/_api/5.4/global.html @@ -2,7 +2,6 @@ layout: default title: "Global" prettify: true -sortKey: "005.004" ---
diff --git a/_api/edge/global.html b/_api/edge/global.html index 5c33683a..500784f3 100644 --- a/_api/edge/global.html +++ b/_api/edge/global.html @@ -2,7 +2,6 @@ layout: default title: "Global" prettify: true -sortKey: "edge" ---
@@ -5756,4 +5755,4 @@
Properties:
Documentation generated by JSDoc.
-
\ No newline at end of file +
diff --git a/_browser-runner-api/0.10.0/module-jasmine-browser-runner.html b/_browser-runner-api/0.10.0/module-jasmine-browser-runner.html index 28b7de38..13b9ba87 100644 --- a/_browser-runner-api/0.10.0/module-jasmine-browser-runner.html +++ b/_browser-runner-api/0.10.0/module-jasmine-browser-runner.html @@ -3,7 +3,6 @@ title: "Module: jasmine-browser-runner" prettify: true archived: true -sortKey: "000.010.000" ---
diff --git a/_browser-runner-api/0.6.0/module-jasmine-browser-runner.html b/_browser-runner-api/0.6.0/module-jasmine-browser-runner.html index 9deb0780..9bcc0f1a 100644 --- a/_browser-runner-api/0.6.0/module-jasmine-browser-runner.html +++ b/_browser-runner-api/0.6.0/module-jasmine-browser-runner.html @@ -3,7 +3,6 @@ title: "Module: jasmine-browser-runner" prettify: true archived: true -sortKey: "000.006.000" ---
@@ -403,4 +402,4 @@
Returns:
Documentation generated by JSDoc 3.6.3 on Mon Jun 28 2021 17:13:54 GMT-0700 (Pacific Daylight Time)
-
\ No newline at end of file +
diff --git a/_browser-runner-api/0.7.0/module-jasmine-browser-runner.html b/_browser-runner-api/0.7.0/module-jasmine-browser-runner.html index b84bb683..f02e5ea0 100644 --- a/_browser-runner-api/0.7.0/module-jasmine-browser-runner.html +++ b/_browser-runner-api/0.7.0/module-jasmine-browser-runner.html @@ -2,7 +2,6 @@ layout: default title: "Module: jasmine-browser-runner" prettify: true -sortKey: "000.007.000" archived: true --- @@ -403,4 +402,4 @@
Returns:
- \ No newline at end of file + diff --git a/_browser-runner-api/0.8.0/module-jasmine-browser-runner.html b/_browser-runner-api/0.8.0/module-jasmine-browser-runner.html index 88463e35..f02e5ea0 100644 --- a/_browser-runner-api/0.8.0/module-jasmine-browser-runner.html +++ b/_browser-runner-api/0.8.0/module-jasmine-browser-runner.html @@ -2,7 +2,6 @@ layout: default title: "Module: jasmine-browser-runner" prettify: true -sortKey: "000.008.000" archived: true --- @@ -403,4 +402,4 @@
Returns:
- \ No newline at end of file + diff --git a/_browser-runner-api/0.9.0/module-jasmine-browser-runner.html b/_browser-runner-api/0.9.0/module-jasmine-browser-runner.html index 07803c01..13b9ba87 100644 --- a/_browser-runner-api/0.9.0/module-jasmine-browser-runner.html +++ b/_browser-runner-api/0.9.0/module-jasmine-browser-runner.html @@ -3,7 +3,6 @@ title: "Module: jasmine-browser-runner" prettify: true archived: true -sortKey: "000.009.000" ---
diff --git a/_browser-runner-api/1.0/module-jasmine-browser-runner.html b/_browser-runner-api/1.0/module-jasmine-browser-runner.html index 1a23f1e6..13b9ba87 100644 --- a/_browser-runner-api/1.0/module-jasmine-browser-runner.html +++ b/_browser-runner-api/1.0/module-jasmine-browser-runner.html @@ -2,7 +2,6 @@ layout: default title: "Module: jasmine-browser-runner" prettify: true -sortKey: "001.000.000" archived: true --- @@ -403,4 +402,4 @@
Returns:
-
\ No newline at end of file + diff --git a/_browser-runner-api/1.4/module-jasmine-browser-runner.html b/_browser-runner-api/1.4/module-jasmine-browser-runner.html index 7e163068..f2cd99c0 100644 --- a/_browser-runner-api/1.4/module-jasmine-browser-runner.html +++ b/_browser-runner-api/1.4/module-jasmine-browser-runner.html @@ -3,7 +3,6 @@ title: "Module: jasmine-browser-runner" prettify: true omit_docco: true -sortKey: "001.004" archived: true --- @@ -404,4 +403,4 @@
Returns:
- \ No newline at end of file + diff --git a/_browser-runner-api/2.0.0-beta.1/module-jasmine-browser-runner.html b/_browser-runner-api/2.0.0-beta.1/module-jasmine-browser-runner.html index 59ad58f5..f2cd99c0 100644 --- a/_browser-runner-api/2.0.0-beta.1/module-jasmine-browser-runner.html +++ b/_browser-runner-api/2.0.0-beta.1/module-jasmine-browser-runner.html @@ -3,7 +3,6 @@ title: "Module: jasmine-browser-runner" prettify: true omit_docco: true -sortKey: "2.0.0-beta.1" archived: true --- @@ -404,4 +403,4 @@
Returns:
- \ No newline at end of file + diff --git a/_browser-runner-api/2.0/module-jasmine-browser-runner.html b/_browser-runner-api/2.0/module-jasmine-browser-runner.html index 9f9e50fe..f2cd99c0 100644 --- a/_browser-runner-api/2.0/module-jasmine-browser-runner.html +++ b/_browser-runner-api/2.0/module-jasmine-browser-runner.html @@ -3,7 +3,6 @@ title: "Module: jasmine-browser-runner" prettify: true omit_docco: true -sortKey: "002.000" archived: true --- @@ -404,4 +403,4 @@
Returns:
- \ No newline at end of file + diff --git a/_browser-runner-api/2.1/module-jasmine-browser-runner.html b/_browser-runner-api/2.1/module-jasmine-browser-runner.html index 839e7adb..178b3584 100644 --- a/_browser-runner-api/2.1/module-jasmine-browser-runner.html +++ b/_browser-runner-api/2.1/module-jasmine-browser-runner.html @@ -2,7 +2,6 @@ layout: default title: "Module: jasmine-browser-runner" prettify: true -sortKey: "002.001" archived: true --- @@ -403,4 +402,4 @@
Returns:
- \ No newline at end of file + diff --git a/_browser-runner-api/2.2/module-jasmine-browser-runner.html b/_browser-runner-api/2.2/module-jasmine-browser-runner.html index a282ff2e..03b41611 100644 --- a/_browser-runner-api/2.2/module-jasmine-browser-runner.html +++ b/_browser-runner-api/2.2/module-jasmine-browser-runner.html @@ -2,7 +2,6 @@ layout: default title: "Module: jasmine-browser-runner" prettify: true -sortKey: "002.020" archived: true --- @@ -403,4 +402,4 @@
Returns:
Documentation generated by JSDoc.
- \ No newline at end of file + diff --git a/_browser-runner-api/2.3/module-jasmine-browser-runner.html b/_browser-runner-api/2.3/module-jasmine-browser-runner.html index 7c4e8368..03b41611 100644 --- a/_browser-runner-api/2.3/module-jasmine-browser-runner.html +++ b/_browser-runner-api/2.3/module-jasmine-browser-runner.html @@ -2,7 +2,6 @@ layout: default title: "Module: jasmine-browser-runner" prettify: true -sortKey: "002.030" archived: true --- @@ -403,4 +402,4 @@
Returns:
Documentation generated by JSDoc.
- \ No newline at end of file + diff --git a/_browser-runner-api/2.4/module-jasmine-browser-runner.html b/_browser-runner-api/2.4/module-jasmine-browser-runner.html index 97acf7be..5c8ba0ac 100644 --- a/_browser-runner-api/2.4/module-jasmine-browser-runner.html +++ b/_browser-runner-api/2.4/module-jasmine-browser-runner.html @@ -2,7 +2,6 @@ layout: default title: "Module: jasmine-browser-runner" prettify: true -sortKey: "002.040" ---
@@ -402,4 +401,4 @@
Returns:
Documentation generated by JSDoc.
-
\ No newline at end of file + diff --git a/_browser-runner-api/2.5/module-jasmine-browser-runner.html b/_browser-runner-api/2.5/module-jasmine-browser-runner.html index 4938a8df..65e4ddc8 100644 --- a/_browser-runner-api/2.5/module-jasmine-browser-runner.html +++ b/_browser-runner-api/2.5/module-jasmine-browser-runner.html @@ -2,7 +2,6 @@ layout: default title: "Module: jasmine-browser-runner" prettify: true -sortKey: "002.050" ---
diff --git a/_browser-runner-api/3.0.0-beta-1/module-jasmine-browser-runner.html b/_browser-runner-api/3.0.0-beta-1/module-jasmine-browser-runner.html index a6e6f82d..cd7e2c65 100644 --- a/_browser-runner-api/3.0.0-beta-1/module-jasmine-browser-runner.html +++ b/_browser-runner-api/3.0.0-beta-1/module-jasmine-browser-runner.html @@ -2,7 +2,6 @@ layout: default title: "Module: jasmine-browser-runner" prettify: true -sortKey: "003.000.0-beta.001" ---
@@ -379,4 +378,4 @@
Returns:
Documentation generated by JSDoc.
-
\ No newline at end of file +
diff --git a/_browser-runner-api/edge/module-jasmine-browser-runner.html b/_browser-runner-api/edge/module-jasmine-browser-runner.html index ff89c525..b492e842 100644 --- a/_browser-runner-api/edge/module-jasmine-browser-runner.html +++ b/_browser-runner-api/edge/module-jasmine-browser-runner.html @@ -2,7 +2,6 @@ layout: default title: "Module: jasmine-browser-runner" prettify: true -sortKey: "edge" ---
@@ -379,4 +378,4 @@
Returns:
Documentation generated by JSDoc.
-
\ No newline at end of file + diff --git a/_npm-api/3.10/Jasmine.html b/_npm-api/3.10/Jasmine.html index 47fd048b..a657cd5a 100644 --- a/_npm-api/3.10/Jasmine.html +++ b/_npm-api/3.10/Jasmine.html @@ -3,7 +3,6 @@ title: "Class: Jasmine" prettify: true archived: true -sortKey: "003.010" ---
@@ -3089,4 +3088,4 @@
Parameters:
-
\ No newline at end of file + diff --git a/_npm-api/3.8/Jasmine.html b/_npm-api/3.8/Jasmine.html index 0d34d1d1..042e2380 100644 --- a/_npm-api/3.8/Jasmine.html +++ b/_npm-api/3.8/Jasmine.html @@ -2,7 +2,6 @@ layout: default title: "Class: Jasmine" prettify: true -sortKey: "003.008" archived: true --- @@ -2433,4 +2432,4 @@
Parameters:
- \ No newline at end of file + diff --git a/_npm-api/3.9/Jasmine.html b/_npm-api/3.9/Jasmine.html index d1310989..042e2380 100644 --- a/_npm-api/3.9/Jasmine.html +++ b/_npm-api/3.9/Jasmine.html @@ -3,7 +3,6 @@ title: "Class: Jasmine" prettify: true archived: true -sortKey: "003.009" ---
diff --git a/_npm-api/4.0/Jasmine.html b/_npm-api/4.0/Jasmine.html index dac0084a..b0480627 100644 --- a/_npm-api/4.0/Jasmine.html +++ b/_npm-api/4.0/Jasmine.html @@ -2,7 +2,6 @@ layout: default title: "Class: Jasmine" prettify: true -sortKey: "004.000" archived: true --- diff --git a/_npm-api/4.1/Jasmine.html b/_npm-api/4.1/Jasmine.html index ebe315d7..016ba56d 100644 --- a/_npm-api/4.1/Jasmine.html +++ b/_npm-api/4.1/Jasmine.html @@ -3,7 +3,6 @@ title: "Class: Jasmine" prettify: true omit_docco: true -sortKey: "004.001" archived: true --- diff --git a/_npm-api/4.2/Jasmine.html b/_npm-api/4.2/Jasmine.html index 1978ce07..016ba56d 100644 --- a/_npm-api/4.2/Jasmine.html +++ b/_npm-api/4.2/Jasmine.html @@ -3,7 +3,6 @@ title: "Class: Jasmine" prettify: true omit_docco: true -sortKey: "004.002" archived: true --- diff --git a/_npm-api/4.3/Jasmine.html b/_npm-api/4.3/Jasmine.html index 1e8d4010..7e0ff7e0 100644 --- a/_npm-api/4.3/Jasmine.html +++ b/_npm-api/4.3/Jasmine.html @@ -3,7 +3,6 @@ title: "Class: Jasmine" prettify: true omit_docco: true -sortKey: "004.003" archived: true --- diff --git a/_npm-api/4.4/Jasmine.html b/_npm-api/4.4/Jasmine.html index 17b20382..7e0ff7e0 100644 --- a/_npm-api/4.4/Jasmine.html +++ b/_npm-api/4.4/Jasmine.html @@ -3,7 +3,6 @@ title: "Class: Jasmine" prettify: true omit_docco: true -sortKey: "004.004" archived: true --- @@ -2842,4 +2841,4 @@
Parameters:
-
\ No newline at end of file + diff --git a/_npm-api/4.5/Jasmine.html b/_npm-api/4.5/Jasmine.html index 36a50177..7e0ff7e0 100644 --- a/_npm-api/4.5/Jasmine.html +++ b/_npm-api/4.5/Jasmine.html @@ -3,7 +3,6 @@ title: "Class: Jasmine" prettify: true omit_docco: true -sortKey: "004.005" archived: true --- @@ -2842,4 +2841,4 @@
Parameters:
- \ No newline at end of file + diff --git a/_npm-api/4.6/Jasmine.html b/_npm-api/4.6/Jasmine.html index d455c186..7e0ff7e0 100644 --- a/_npm-api/4.6/Jasmine.html +++ b/_npm-api/4.6/Jasmine.html @@ -3,7 +3,6 @@ title: "Class: Jasmine" prettify: true omit_docco: true -sortKey: "004.006" archived: true --- @@ -2842,4 +2841,4 @@
Parameters:
- \ No newline at end of file + diff --git a/_npm-api/5.0.0-alpha.0/Jasmine.html b/_npm-api/5.0.0-alpha.0/Jasmine.html index 1f56affe..2c4e658e 100644 --- a/_npm-api/5.0.0-alpha.0/Jasmine.html +++ b/_npm-api/5.0.0-alpha.0/Jasmine.html @@ -3,7 +3,6 @@ title: "Class: Jasmine" prettify: true omit_docco: true -sortKey: "005.000.0-alpha.000" archived: true --- @@ -2988,4 +2987,4 @@
Parameters:
- \ No newline at end of file + diff --git a/_npm-api/5.0.0-alpha.1/Jasmine.html b/_npm-api/5.0.0-alpha.1/Jasmine.html index d8a13a7a..2c4e658e 100644 --- a/_npm-api/5.0.0-alpha.1/Jasmine.html +++ b/_npm-api/5.0.0-alpha.1/Jasmine.html @@ -3,7 +3,6 @@ title: "Class: Jasmine" prettify: true omit_docco: true -sortKey: "005.000.0-alpha.001" archived: true --- @@ -2988,4 +2987,4 @@
Parameters:
- \ No newline at end of file + diff --git a/_npm-api/5.0.0-beta.0/Jasmine.html b/_npm-api/5.0.0-beta.0/Jasmine.html index 4959fcc8..2c4e658e 100644 --- a/_npm-api/5.0.0-beta.0/Jasmine.html +++ b/_npm-api/5.0.0-beta.0/Jasmine.html @@ -3,7 +3,6 @@ title: "Class: Jasmine" prettify: true omit_docco: true -sortKey: "005.000.0-beta.000" archived: true --- @@ -2988,4 +2987,4 @@
Parameters:
- \ No newline at end of file + diff --git a/_npm-api/5.0/Jasmine.html b/_npm-api/5.0/Jasmine.html index 9cee505d..ca38a7bf 100644 --- a/_npm-api/5.0/Jasmine.html +++ b/_npm-api/5.0/Jasmine.html @@ -3,7 +3,6 @@ title: "Class: Jasmine" prettify: true omit_docco: true -sortKey: "005.000" archived: true --- @@ -2988,4 +2987,4 @@
Parameters:
- \ No newline at end of file + diff --git a/_npm-api/5.1/Jasmine.html b/_npm-api/5.1/Jasmine.html index b79bf1a3..2c4e658e 100644 --- a/_npm-api/5.1/Jasmine.html +++ b/_npm-api/5.1/Jasmine.html @@ -3,7 +3,6 @@ title: "Class: Jasmine" prettify: true omit_docco: true -sortKey: "005.001" archived: true --- diff --git a/_npm-api/5.2/Jasmine.html b/_npm-api/5.2/Jasmine.html index 6f5a6228..286061b4 100644 --- a/_npm-api/5.2/Jasmine.html +++ b/_npm-api/5.2/Jasmine.html @@ -2,7 +2,6 @@ layout: default title: "Class: Jasmine" prettify: true -sortKey: "005.002" archived: true --- @@ -3128,4 +3127,4 @@
Parameters:
Documentation generated by JSDoc.
- \ No newline at end of file + diff --git a/_npm-api/5.3/Jasmine.html b/_npm-api/5.3/Jasmine.html index a85ffe68..fe384563 100644 --- a/_npm-api/5.3/Jasmine.html +++ b/_npm-api/5.3/Jasmine.html @@ -2,7 +2,6 @@ layout: default title: "Class: Jasmine" prettify: true -sortKey: "005.003" ---
@@ -3127,4 +3126,4 @@
Parameters:
Documentation generated by JSDoc.
-
\ No newline at end of file + diff --git a/_npm-api/5.4/Jasmine.html b/_npm-api/5.4/Jasmine.html index dcbc6b33..eb2dcfec 100644 --- a/_npm-api/5.4/Jasmine.html +++ b/_npm-api/5.4/Jasmine.html @@ -2,7 +2,6 @@ layout: default title: "Class: Jasmine" prettify: true -sortKey: "005.004" ---
diff --git a/_npm-api/edge/Jasmine.html b/_npm-api/edge/Jasmine.html index 40c8045f..0d8adadd 100644 --- a/_npm-api/edge/Jasmine.html +++ b/_npm-api/edge/Jasmine.html @@ -2,7 +2,6 @@ layout: default title: "Class: Jasmine" prettify: true -sortKey: "edge" ---
@@ -3127,4 +3126,4 @@
Parameters:
Documentation generated by JSDoc.
-
\ No newline at end of file +
diff --git a/_plugins/SortByVersion.rb b/_plugins/SortByVersion.rb new file mode 100644 index 00000000..034417e8 --- /dev/null +++ b/_plugins/SortByVersion.rb @@ -0,0 +1,32 @@ +module Jekyll + module SortByVersion + def sort_by_version(pages) + pages.sort { |a, b| + a = version(a) + b = version(b) + + if a == 'edge' && b == 'edge' + 0 + elsif a == 'edge' + 1 + elsif b == 'edge' + -1 + else + Gem::Version.new(a) <=> Gem::Version.new(b) + end + } + end + + private + + def version(page) + page.url + .sub(/^\/api\/npm\//, '') + .sub(/^\/api\/browser-runner\//, '') + .sub(/^\/api\//, '') + .split('/')[0] + end + end +end + +Liquid::Template.register_filter(Jekyll::SortByVersion) \ No newline at end of file diff --git a/package.json b/package.json index 88bed684..6dfbee3b 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,6 @@ "jsdoc-core": "jsdoc -c jsdoc-conf-core.json --verbose", "jsdoc-browser-runner": "jsdoc -c jsdoc-conf-browser-runner.json --verbose", "jsdoc-npm": "jsdoc -c jsdoc-conf-npm.json --verbose", - "postjsdoc-core": "src/jsdoc-tools/makeSortable.js _api Global.html", - "postjsdoc-browser-runner": "src/jsdoc-tools/makeSortable.js _browser-runner-api module-jasmine-browser-runner.html", - "postjsdoc-npm": "src/jsdoc-tools/makeSortable.js _npm-api Jasmine.html", "install": "cp node_modules/anchor-js/anchor.min.js scripts/anchor.min.js" }, "dependencies": { diff --git a/pages/archives.html b/pages/archives.html index f1a08944..24bb80b5 100644 --- a/pages/archives.html +++ b/pages/archives.html @@ -19,7 +19,7 @@

API Reference

jasmine-core

    - {% assign versions = site.api | sort: 'sortKey' %} + {% assign versions = site.api | sort_by_version %} {% for version in versions reversed %} {% if version.url contains "/global" and version.archived %}
  1. {{ version.url | remove_first: "/api/" | remove: "/global" | capitalize }}
  2. @@ -28,7 +28,7 @@

    jasmine-core

jasmine-npm

    - {% assign versions = site.npm-api | sort: 'sortKey' %} + {% assign versions = site.npm-api | sort_by_version' %} {% for version in versions reversed %} {% if version.title == "Class: Jasmine" and version.archived %}
  1. {{ version.url | remove_first: "/api/npm/" | remove: "/Jasmine" | capitalize }}
  2. @@ -37,7 +37,7 @@

    jasmine-npm

jasmine-browser-runner

    - {% assign versions = site.browser-runner-api | sort: 'sortKey' %} + {% assign versions = site.browser-runner-api | sortByVersion %} {% for version in versions reversed %} {% if version.url contains "/module-jasmine-browser-runner" and version.archived %}
  1. {{ version.url | remove_first: "/api/browser-runner/" | remove: "/module-jasmine-browser-runner" | capitalize }}
  2. diff --git a/pages/docs_home.html b/pages/docs_home.html index 0885e7a1..efc246e2 100644 --- a/pages/docs_home.html +++ b/pages/docs_home.html @@ -79,7 +79,7 @@

    Guides for Specific Environments

    API Reference

    jasmine-core

      - {% assign versions = site.api | sort: 'sortKey' %} + {% assign versions = site.api | sortByVersion %} {% for version in versions reversed %} {% if version.url contains "/global" and version.archived != true %}
    1. {{ version.url | remove_first: "/api/" | remove: "/global" | capitalize }}
    2. @@ -88,7 +88,7 @@

      jasmine-core

    jasmine-npm

      - {% assign versions = site.npm-api | sort: 'sortKey' %} + {% assign versions = site.npm-api | sortByVersion %} {% for version in versions reversed %} {% if version.title == "Class: Jasmine" and version.archived != true %}
    1. {{ version.url | remove_first: "/api/npm/" | remove: "/Jasmine" | capitalize }}
    2. @@ -97,7 +97,7 @@

      jasmine-npm

    jasmine-browser-runner

      - {% assign versions = site.browser-runner-api | sort: 'sortKey' %} + {% assign versions = site.browser-runner-api | sortByVersion %} {% for version in versions reversed %} {% if version.url contains "/module-jasmine-browser-runner" and version.archived != true %}
    1. {{ version.url | remove_first: "/api/browser-runner/" | remove: "/module-jasmine-browser-runner" | capitalize }}
    2. diff --git a/src/jsdoc-tools/asciibeticalVersion.js b/src/jsdoc-tools/asciibeticalVersion.js deleted file mode 100644 index 6401aa0f..00000000 --- a/src/jsdoc-tools/asciibeticalVersion.js +++ /dev/null @@ -1,34 +0,0 @@ -function toAsciibetical(versionNumber) { - return versionNumber.split('.').map(pad3).join('.'); -} - -function addVersion(version, input) { - const lines = input.split('\n'); - const newKey = `sortKey: "${toAsciibetical(version)}"`; - - if (lines[0] !== '---') { - throw new Error('Did not find YAML at the start of input'); - } - - for (let i = 1; i < lines.length; i++) { - if (lines[i].startsWith('sortKey: ')) { - lines[i] = newKey; - break; - } else if (lines[i] === '---') { - lines.splice(i, 0, newKey); - break; - } - } - - return lines.join('\n'); -} - -function pad3(s) { - while (s.length < 3) { - s = '0' + s; - } - - return s; -} - -module.exports = {toAsciibetical, addVersion}; diff --git a/src/jsdoc-tools/asciibeticalVersionSpec.js b/src/jsdoc-tools/asciibeticalVersionSpec.js deleted file mode 100644 index ca923109..00000000 --- a/src/jsdoc-tools/asciibeticalVersionSpec.js +++ /dev/null @@ -1,74 +0,0 @@ -const {toAsciibetical, addVersion} = require('./asciibeticalVersion'); - -describe('asciibeticalVersion', function() { - describe('toAsciibetical', function() { - it('pads components so the version numbers sort correctly', function () { - const input = ['10.2', '10.100', '3.8', '3.9', '3.10']; - const expected = ['003.008', '003.009', '003.010', '010.002', '010.100']; - const actual = input.map(toAsciibetical); - actual.sort(); - expect(actual).toEqual(expected); - }); - - it('returns non-version-numbers unmodified', function() { - expect(toAsciibetical('edge')).toEqual('edge'); - }) - }); - - describe('addVersion', function() { - it('adds an asciibetical formatted version number', function() { - const input = '---\n' + - 'layout: default\n' + - 'title: "Global"\n' + - 'prettify: true\n' + - '---\n' + - ' some HTML here\n'; - const expected = '---\n' + - 'layout: default\n' + - 'title: "Global"\n' + - 'prettify: true\n' + - 'sortKey: "003.010"\n' + - '---\n' + - ' some HTML here\n'; - const output = addVersion('3.10', input); - expect(output).toEqual(expected); - }); - - it('replaces an existing sortKey', function() { - const input = '---\n' + - 'layout: default\n' + - 'title: "Global"\n' + - 'prettify: true\n' + - 'sortKey: "003.010"\n' + - '---\n' + - ' some HTML here\n'; - const expected = '---\n' + - 'layout: default\n' + - 'title: "Global"\n' + - 'prettify: true\n' + - 'sortKey: "003.011"\n' + - '---\n' + - ' some HTML here\n'; - const output = addVersion('3.11', input); - expect(output).toEqual(expected); - }); - - it('is not fooled by occurrences of sortKey after the YAML', function() { - const input = '---\n' + - 'layout: default\n' + - 'title: "Global"\n' + - 'prettify: true\n' + - '---\n' + - 'sortKey: "not the droids you are looking for"'; - const expected = '---\n' + - 'layout: default\n' + - 'title: "Global"\n' + - 'prettify: true\n' + - 'sortKey: "003.011"\n' + - '---\n' + - 'sortKey: "not the droids you are looking for"'; - const output = addVersion('3.11', input); - expect(output).toEqual(expected); - }); - }); -}); diff --git a/src/jsdoc-tools/makeSortable.js b/src/jsdoc-tools/makeSortable.js deleted file mode 100755 index a0890ae3..00000000 --- a/src/jsdoc-tools/makeSortable.js +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env node - -const fs = require('fs'); -const path = require('path'); -const {addVersion} = require('./asciibeticalVersion'); - -if (process.argv.length !== 4) { - console.log('Usage: makeSortable dirname index-filename'); - process.exit(1); -} - -const basedir = process.argv[2]; -const indexFilename = process.argv[3]; - -for (const entry of fs.readdirSync(basedir, {withFileTypes: true})) { - if (entry.isDirectory() && entry.name !== '.' && entry.name !== '..') { - const version = entry.name; - const filename = `${basedir}/${version}/${indexFilename}`; - - fs.writeFileSync( - filename, - addVersion(version, fs.readFileSync(filename, {encoding: 'utf8'})), - {encoding: 'utf8'} - ); - } -} \ No newline at end of file diff --git a/src/jsdoc-tools/spec/support/jasmine.json b/src/jsdoc-tools/spec/support/jasmine.json deleted file mode 100644 index d73ed627..00000000 --- a/src/jsdoc-tools/spec/support/jasmine.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "spec_dir": ".", - "spec_files": [ - "**/*[sS]pec.?(m)js" - ], - "helpers": [] -}