Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added bryntum library detection #184

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ supports:
- [base2](https://code.google.com/p/base2/)
- [boomerang](https://soasta.github.io/boomerang/)
- [Bootstrap](http://getbootstrap.com/)
- [Bryntum](https://bryntum.com/)
- Boq
- [Brewser](https://robertpataki.github.io/brewser/)
- [CamanJS](http://camanjs.com/)
Expand Down
Binary file added icons/bryntum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 17 additions & 4 deletions library/libraries.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,19 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = {
}
},

'Bryntum': {
id: 'bryntum',
icon: 'bryntum',
url: 'https://bryntum.com/',
npm: 'bryntum',
test: function(win) {
if(win.bryntum) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add an additional check here as seen in other library tests

return { version: bryntum.getVersion('core') || UNKNOWN_VERSION };
}
return false;
}
},

'Polymer': {
id: 'polymer',
icon: 'polymer',
Expand Down Expand Up @@ -1605,7 +1618,7 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = {
if (scripts.some(s => reRequireScript.test(s.src))) {
return { version: 2 }; // Magento 1 is no longer supported and this only verifies version 2
}

return false;
}
},
Expand Down Expand Up @@ -1677,7 +1690,7 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = {
return false;
});
});

return Promise.race([workerPromise, timeoutPromise]).catch(function(exception) {
return false;
}).finally(result => {
Expand Down Expand Up @@ -1776,12 +1789,12 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = {
test: function (win) {
let child = win.document.body.firstElementChild;
let noscript, root;

do {
if (child.localName === 'noscript') noscript = child;
else if (child.id === 'root') root = child;
} while (child = child.nextElementSibling);

if (root && noscript && /You need to enable JavaScript to run this app/.test(noscript.textContent)) {
return { version: UNKNOWN_VERSION };
}
Expand Down