Skip to content

feat: add bootstrap detector #113

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

Open
wants to merge 3 commits into
base: main
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
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ To support a new Vue framework, please look at [detectors/frameworks.json](detec
- [Vue Material](https://www.creative-tim.com/vuematerial)
- [Vulk](https://vulk.cssninja.io)
- [Arco Design](https://arco.design)
- [Bootstrap](https://getbootstrap.com)

To support a new UI library, please look at [detectors/uis.json](detectors/uis.json).

Expand Down
15 changes: 15 additions & 0 deletions detectors/uis.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,5 +179,20 @@
"detectors": {
"html": "<(?:div|button|a) [^>]*class=\"arco-[a-z0-9-]*"
}
},
"bootstrap": {
"metas": {
"slug": "bootstrap",
"name": "Bootstrap",
"imgPath": "/ui/getbootstrap.svg",
"url": "https://getbootstrap.com"
},
"detectors": {
"html": [
"<link [^>]*href=\"[^\"]+bootstrap(?:\\.min)?\\.css",
"<script [^>]*src=\"[^\"]+bootstrap.min\\.js"
],
"js": "[...document.styleSheets].filter(s => !s.href || s.href.includes(location.origin)).map(s => [...s.cssRules].some(r => r.selectorText?.includes(':root') && r.cssText.includes('--bs-'))).some(v => v)"
}
}
}
3 changes: 3 additions & 0 deletions icons/ui/getbootstrap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.