Compare commits

..

22 Commits

Author SHA1 Message Date
XhmikosR 679759f0c3 Update karma.conf.js 2024-03-07 17:45:54 +02:00
XhmikosR 14b39390c2 BrowserStack: Google Pixel 3 2024-03-07 17:39:00 +02:00
Mukesh Rana 97b6cbcbfd Fixes to increase stability (#38511)
Co-authored-by: Akshat Rustagi <akshatr@lambdatest.com>
2024-03-07 17:39:00 +02:00
XhmikosR 9ed525eb83 @lambdatest/node-tunnel 4.0.7 2024-03-07 17:38:59 +02:00
XhmikosR 572c9756e5 Reduce actions timeout to 15 minutes 2024-03-07 17:38:59 +02:00
XhmikosR f27a9c02d8 Updates 2024-03-07 17:38:59 +02:00
XhmikosR b7c62d51f2 Partially revert "Remove BrowserStack" 2024-03-07 17:38:59 +02:00
XhmikosR 7f6b214a2a Update lt-local.js 2024-03-07 17:38:59 +02:00
XhmikosR 45149e75dc Remove BrowserStack 2024-03-07 17:38:59 +02:00
XhmikosR 625344c242 Testing 2024-03-07 17:38:59 +02:00
Mukesh Rana f6d129182a Fixes 2024-03-07 17:38:59 +02:00
XhmikosR 8dded72f16 @lambdatest/node-tunnel 3.0.14 2024-03-07 17:38:59 +02:00
Akshat Rustagi 9bf1787783 Update device to Pixel 6 for Android 12. (#38416) 2024-03-07 17:38:59 +02:00
XhmikosR dca50e4735 Increase retryLimit to 3 2024-03-07 17:38:59 +02:00
XhmikosR 90add983e1 Increase Jasmine timeout to 20000 2024-03-07 17:38:59 +02:00
XhmikosR 918766ebec Update karma-browserstack-launcher 2024-03-07 17:38:58 +02:00
Mukesh Rana 6ea5131e06 Remove sleep and use iPhone 7 in devices (#38356) 2024-03-07 17:38:58 +02:00
Mukesh Rana b5dac1e50a Some fixes (#38354) 2024-03-07 17:38:58 +02:00
XhmikosR d42acd2453 Add --race 2024-03-07 17:38:58 +02:00
XhmikosR ce75d1d0e3 Add LambdaTest workflow 2024-03-07 17:38:58 +02:00
XhmikosR 4c3849f231 Fixes 2024-03-07 17:21:01 +02:00
Mukesh Rana 41d6ad9bc3 Add Lambdatest support 2024-03-07 17:21:01 +02:00
28 changed files with 10775 additions and 3888 deletions
+7
View File
@@ -0,0 +1,7 @@
**/*.min.js
**/dist/
**/vendor/
/_site/
/js/coverage/
/site/static/sw.js
/site/layouts/partials/
+66 -24
View File
@@ -1,15 +1,11 @@
{
"envs": [
"browser"
],
"semicolon": false,
"space": 2,
"ignores": [
"**/*.min.js",
"**/dist/**",
"**/vendor/**",
"site/layouts/partials/",
"site/static/sw.js"
"root": true,
"extends": [
"plugin:import/errors",
"plugin:import/warnings",
"plugin:unicorn/recommended",
"xo",
"xo/browser"
],
"rules": {
"arrow-body-style": "off",
@@ -25,6 +21,36 @@
"js": "always"
}
],
"import/first": "error",
"import/newline-after-import": "error",
"import/no-absolute-path": "error",
"import/no-amd": "error",
"import/no-cycle": [
"error",
{
"ignoreExternal": true
}
],
"import/no-duplicates": "error",
"import/no-extraneous-dependencies": "error",
"import/no-mutable-exports": "error",
"import/no-named-as-default": "error",
"import/no-named-as-default-member": "error",
"import/no-named-default": "error",
"import/no-self-import": "error",
"import/no-unassigned-import": [
"error"
],
"import/no-useless-path-segments": "error",
"import/order": "error",
"indent": [
"error",
2,
{
"MemberExpression": "off",
"SwitchCase": 1
}
],
"logical-assignment-operators": "off",
"max-params": [
"warn",
@@ -41,6 +67,7 @@
}
],
"no-console": "error",
"no-negated-condition": "off",
"object-curly-spacing": [
"error",
"always"
@@ -51,19 +78,26 @@
],
"prefer-object-has-own": "off",
"prefer-template": "error",
"semi": [
"error",
"never"
],
"strict": "error",
"unicorn/explicit-length-check": "off",
"unicorn/filename-case": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-array-method-this-argument": "off",
"unicorn/no-negated-condition": "off",
"unicorn/no-null": "off",
"unicorn/no-typeof-undefined": "off",
"unicorn/no-unused-properties": "error",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-array-flat": "off",
"unicorn/prefer-at": "off",
"unicorn/prefer-dom-node-dataset": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prefer-spread": "off",
"unicorn/prefer-string-replace-all": "off",
"unicorn/prevent-abbreviations": "off"
},
"overrides": [
@@ -71,6 +105,10 @@
"files": [
"build/**"
],
"env": {
"browser": false,
"node": true
},
"parserOptions": {
"sourceType": "module"
},
@@ -92,6 +130,9 @@
"js/tests/*.js",
"js/tests/integration/rollup*.js"
],
"env": {
"node": true
},
"parserOptions": {
"sourceType": "script"
}
@@ -100,9 +141,9 @@
"files": [
"js/tests/unit/**"
],
"envs": [
"jasmine"
],
"env": {
"jasmine": true
},
"rules": {
"no-console": "off",
"unicorn/consistent-function-scoping": "off",
@@ -132,6 +173,9 @@
"files": [
"scss/tests/**"
],
"env": {
"node": true
},
"parserOptions": {
"sourceType": "script"
}
@@ -140,18 +184,17 @@
"files": [
"site/**"
],
"env": {
"browser": true,
"node": false
},
"parserOptions": {
"sourceType": "script",
"ecmaVersion": 2019
},
"rules": {
"no-new": "off",
"strict": [
"error",
"function"
],
"unicorn/no-array-for-each": "off",
"unicorn/numeric-separators-style": "off"
"unicorn/no-array-for-each": "off"
}
},
{
@@ -165,10 +208,9 @@
},
{
"files": [
"**/*.md/*.js",
"**/*.md/*.mjs"
"**/*.md/*.js"
],
"extends": "plugin:markdown/recommended-legacy",
"extends": "plugin:markdown/recommended",
"parserOptions": {
"sourceType": "module"
},
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
browserstack:
runs-on: ubuntu-latest
if: github.repository == 'twbs/bootstrap'
timeout-minutes: 30
timeout-minutes: 15
steps:
- name: Clone repository
+47
View File
@@ -0,0 +1,47 @@
name: LambdaTest
on:
push:
branches:
- "**"
- "!dependabot/**"
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 20
permissions:
contents: read
jobs:
lambdatest:
runs-on: ubuntu-latest
if: github.repository == 'twbs/bootstrap'
timeout-minutes: 15
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE }}"
cache: npm
- name: Install npm dependencies
run: npm ci
- name: Run dist
run: npm run dist
- name: Run LambdaTest tests
run: npm run js-test-lt-cloud
env:
LT_USERNAME: "${{ secrets.LT_USERNAME }}"
LT_ACCESS_KEY: "${{ secrets.LT_ACCESS_KEY }}"
LT_TUNNEL_NAME: "tunnel-${{ github.sha }}"
GITHUB_SHA: "${{ github.sha }}"
+1
View File
@@ -41,3 +41,4 @@ Thumbs.db
/dist-sass/
/js/coverage/
/node_modules/
/.lambdatest/
+1
View File
@@ -0,0 +1 @@
lockfile-version=2
+1 -1
View File
@@ -177,7 +177,7 @@ Get updates on Bootstrap's development and chat with the project maintainers and
- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).
- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/).
- Ask questions and explore [our GitHub Discussions](https://github.com/twbs/bootstrap/discussions).
- Discuss, ask questions, and more on [the community Discord](https://discord.gg/bZUvakRU3M) or [Bootstrap subreddit](https://www.reddit.com/r/bootstrap/).
- Discuss, ask questions, and more on [the community Discord](https://discord.gg/bZUvakRU3M) or [Bootstrap subreddit](https://reddit.com/r/bootstrap).
- Chat with fellow Bootstrappers in IRC. On the `irc.libera.chat` server, in the `#bootstrap` channel.
- Implementation help may be found at Stack Overflow (tagged [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5)).
- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.
+2 -6
View File
@@ -7,10 +7,9 @@
*/
import path from 'node:path'
import process from 'node:process'
import { fileURLToPath } from 'node:url'
import { babel } from '@rollup/plugin-babel'
import { globby } from 'globby'
import globby from 'globby'
import { rollup } from 'rollup'
import banner from './banner.mjs'
@@ -18,7 +17,7 @@ const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const sourcePath = path.resolve(__dirname, '../js/src/').replace(/\\/g, '/')
const jsFiles = await globby(`${sourcePath}/**/*.js`)
const jsFiles = globby.sync(`${sourcePath}/**/*.js`)
// Array which holds the resolved plugins
const resolvedPlugins = []
@@ -38,9 +37,6 @@ for (const file of jsFiles) {
}
const build = async plugin => {
/**
* @type {import('rollup').GlobalsOption}
*/
const globals = {}
const bundle = await rollup({
-1
View File
@@ -4,7 +4,6 @@ const mapConfig = {
sourcesContent: true
}
// eslint-disable-next-line import/no-anonymous-default-export
export default context => {
return {
map: context.file.dirname.includes('examples') ? false : mapConfig,
-1
View File
@@ -7,7 +7,6 @@
*/
import { execFile, spawn } from 'node:child_process'
import process from 'node:process'
import vnu from 'vnu-jar'
execFile('java', ['-version'], (error, stdout, stderr) => {
-3
View File
@@ -67,9 +67,6 @@ params:
icons: "https://icons.getbootstrap.com/"
swag: "https://cottonbureau.com/people/bootstrap"
analytics:
fathom_site: "ITUSEYJG"
download:
source: "https://github.com/twbs/bootstrap/archive/v5.3.3.zip"
dist: "https://github.com/twbs/bootstrap/releases/download/v5.3.3/bootstrap-5.3.3-dist.zip"
-1
View File
@@ -18,7 +18,6 @@ import Tab from './src/tab.js'
import Toast from './src/toast.js'
import Tooltip from './src/tooltip.js'
// eslint-disable-next-line import/no-anonymous-default-export
export default {
Alert,
Button,
-1
View File
@@ -11,7 +11,6 @@
const elementMap = new Map()
// eslint-disable-next-line import/no-anonymous-default-export
export default {
set(element, key, instance) {
if (!elementMap.has(element)) {
+142 -68
View File
@@ -3,75 +3,149 @@
'use strict'
const browsers = {
safariMac: {
base: 'BrowserStack',
os: 'OS X',
os_version: 'Catalina',
browser: 'Safari',
browser_version: 'latest'
browserStack: {
safariMac: {
base: 'BrowserStack',
os: 'OS X',
os_version: 'Catalina',
browser: 'Safari',
browser_version: 'latest'
},
chromeMac: {
base: 'BrowserStack',
os: 'OS X',
os_version: 'Catalina',
browser: 'Chrome',
browser_version: 'latest'
},
firefoxMac: {
base: 'BrowserStack',
os: 'OS X',
os_version: 'Catalina',
browser: 'Firefox',
browser_version: 'latest'
},
chromeWin10: {
base: 'BrowserStack',
os: 'Windows',
os_version: '10',
browser: 'Chrome',
browser_version: '60'
},
firefoxWin10: {
base: 'BrowserStack',
os: 'Windows',
os_version: '10',
browser: 'Firefox',
browser_version: '60'
},
chromeWin10Latest: {
base: 'BrowserStack',
os: 'Windows',
os_version: '10',
browser: 'Chrome',
browser_version: 'latest'
},
firefoxWin10Latest: {
base: 'BrowserStack',
os: 'Windows',
os_version: '10',
browser: 'Firefox',
browser_version: 'latest'
},
iphone7: {
base: 'BrowserStack',
os: 'ios',
os_version: '12.0',
device: 'iPhone 7',
real_mobile: true
},
iphone12: {
base: 'BrowserStack',
os: 'ios',
os_version: '14.0',
device: 'iPhone 12',
real_mobile: true
},
pixel3: {
base: 'BrowserStack',
os: 'android',
os_version: '9.0',
device: 'Google Pixel 3',
real_mobile: true
}
},
chromeMac: {
base: 'BrowserStack',
os: 'OS X',
os_version: 'Catalina',
browser: 'Chrome',
browser_version: 'latest'
},
firefoxMac: {
base: 'BrowserStack',
os: 'OS X',
os_version: 'Catalina',
browser: 'Firefox',
browser_version: 'latest'
},
chromeWin10: {
base: 'BrowserStack',
os: 'Windows',
os_version: '10',
browser: 'Chrome',
browser_version: '60'
},
firefoxWin10: {
base: 'BrowserStack',
os: 'Windows',
os_version: '10',
browser: 'Firefox',
browser_version: '60'
},
chromeWin10Latest: {
base: 'BrowserStack',
os: 'Windows',
os_version: '10',
browser: 'Chrome',
browser_version: 'latest'
},
firefoxWin10Latest: {
base: 'BrowserStack',
os: 'Windows',
os_version: '10',
browser: 'Firefox',
browser_version: 'latest'
},
iphone7: {
base: 'BrowserStack',
os: 'ios',
os_version: '12.0',
device: 'iPhone 7',
real_mobile: true
},
iphone12: {
base: 'BrowserStack',
os: 'ios',
os_version: '14.0',
device: 'iPhone 12',
real_mobile: true
},
pixel2: {
base: 'BrowserStack',
os: 'android',
os_version: '8.0',
device: 'Google Pixel 2',
real_mobile: true
lambdaTest: {
safariMac: {
browserName: 'Safari',
browserVersion: 'latest',
'LT:Options': {
platformName: 'MacOS Monterey'
}
},
chromeMac: {
browserName: 'Chrome',
browserVersion: 'latest',
'LT:Options': {
platformName: 'MacOS Monterey'
}
},
firefoxMac: {
browserName: 'Firefox',
browserVersion: 'latest',
'LT:Options': {
platformName: 'MacOS Monterey'
}
},
chromeWin10: {
browserName: 'Chrome',
browserVersion: '60',
'LT:Options': {
platformName: 'Windows 10'
}
},
firefoxWin10: {
browserName: 'Firefox',
browserVersion: '60',
'LT:Options': {
platformName: 'Windows 10'
}
},
chromeWin10Latest: {
browserName: 'Chrome',
browserVersion: 'latest',
'LT:Options': {
platformName: 'Windows 10'
}
},
firefoxWin10Latest: {
browserName: 'Firefox',
browserVersion: 'latest',
'LT:Options': {
platformName: 'Windows 10'
}
},
ios15: {
platformName: 'ios',
platformVersion: '15',
browserName: 'Safari',
deviceName: 'iPhone.*',
isRealMobile: true
},
ios16: {
platformName: 'ios',
platformVersion: '16',
browserName: 'Safari',
deviceName: 'iPhone.*',
isRealMobile: true
},
android12: {
platformName: 'android',
platformVersion: '12',
browserName: 'Chrome',
deviceName: 'Pixel.*',
isRealMobile: true
}
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
/* eslint-disable import/extensions, n/file-extension-in-import, import/no-unassigned-import */
/* eslint-disable import/extensions, import/no-unassigned-import */
import Tooltip from '../../dist/tooltip'
import '../../dist/carousel'
+62 -10
View File
@@ -1,7 +1,6 @@
'use strict'
const path = require('node:path')
const process = require('node:process')
const ip = require('ip')
const { babel } = require('@rollup/plugin-babel')
const istanbul = require('rollup-plugin-istanbul')
@@ -10,9 +9,21 @@ const replace = require('@rollup/plugin-replace')
const { browsers } = require('./browsers.js')
const ENV = process.env
const BROWSERSTACK = Boolean(ENV.BROWSERSTACK)
const DEBUG = Boolean(ENV.DEBUG)
const JQUERY_TEST = Boolean(ENV.JQUERY)
const BROWSERSTACK = Boolean(ENV.BROWSERSTACK)
const LAMBDATEST = Boolean(ENV.LAMBDATEST)
const webDriverConfig = {
desktop: {
hostname: 'hub.lambdatest.com',
port: 80
},
mobile: {
hostname: 'mobile-hub.lambdatest.com',
port: 80
}
}
const frameworks = [
'jasmine'
@@ -55,15 +66,23 @@ const config = {
colors: true,
autoWatch: false,
singleRun: true,
concurrency: Number.POSITIVE_INFINITY,
captureTimeout: 180_000,
browserDisconnectTolerance: 3,
browserDisconnectTimeout: 180_000,
browserNoActivityTimeout: 400_000,
retryLimit: 2,
concurrency: 5,
client: {
clearContext: false
clearContext: false,
jasmine: {
timeoutInterval: 120_000
}
},
files: [
'node_modules/hammer-simulator/index.js',
{
pattern: 'js/tests/unit/**/!(jquery).spec.js',
watched: !BROWSERSTACK
watched: !BROWSERSTACK && !LAMBDATEST
}
],
preprocessors: {
@@ -99,18 +118,51 @@ const config = {
}
}
if (BROWSERSTACK) {
if (LAMBDATEST) {
config.hostname = 'localhost.lambdatest.com'
config.captureTimeout = 600_000
for (const key of Object.keys(browsers.lambdaTest)) {
browsers.lambdaTest[key].base = 'WebDriver'
browsers.lambdaTest[key].build = `bootstrap-${ENV.GITHUB_SHA ? `${ENV.GITHUB_SHA.slice(0, 7)}-` : ''}${new Date().toISOString()}`
browsers.lambdaTest[key].project = 'Bootstrap'
if (browsers.lambdaTest[key].isRealMobile) {
browsers.lambdaTest[key].config = webDriverConfig.mobile
browsers.lambdaTest[key].user = ENV.LT_USERNAME
browsers.lambdaTest[key].accessKey = ENV.LT_ACCESS_KEY
browsers.lambdaTest[key].tunnel = true
browsers.lambdaTest[key].console = true
browsers.lambdaTest[key].network = true
browsers.lambdaTest[key].tunnelName = ENV.LT_TUNNEL_NAME || 'jasmine'
browsers.lambdaTest[key].pseudoActivityInterval = 5000 // 5000 ms heartbeat
} else {
browsers.lambdaTest[key].config = webDriverConfig.desktop
browsers.lambdaTest[key]['LT:Options'].username = ENV.LT_USERNAME
browsers.lambdaTest[key]['LT:Options'].accessKey = ENV.LT_ACCESS_KEY
browsers.lambdaTest[key]['LT:Options'].tunnel = true
browsers.lambdaTest[key]['LT:Options'].console = true
browsers.lambdaTest[key]['LT:Options'].network = true
browsers.lambdaTest[key]['LT:Options'].tunnelName = ENV.LT_TUNNEL_NAME || 'jasmine'
browsers.lambdaTest[key]['LT:Options'].pseudoActivityInterval = 5000 // 5000 ms heartbeat
}
}
plugins.push('karma-webdriver-launcher', 'karma-jasmine-html-reporter')
config.customLaunchers = browsers.lambdaTest
config.browsers = Object.keys(browsers.lambdaTest)
reporters.push('kjhtml')
} else if (BROWSERSTACK) {
config.hostname = ip.address()
config.browserStack = {
username: ENV.BROWSER_STACK_USERNAME,
accessKey: ENV.BROWSER_STACK_ACCESS_KEY,
build: `bootstrap-${ENV.GITHUB_SHA ? `${ENV.GITHUB_SHA.slice(0, 7)}-` : ''}${new Date().toISOString()}`,
project: 'Bootstrap',
retryLimit: 2
project: 'Bootstrap'
}
plugins.push('karma-browserstack-launcher', 'karma-jasmine-html-reporter')
config.customLaunchers = browsers
config.browsers = Object.keys(browsers)
config.customLaunchers = browsers.browserStack
config.browsers = Object.keys(browsers.browserStack)
reporters.push('BrowserStack', 'kjhtml')
} else if (JQUERY_TEST) {
frameworks.push('detectBrowsers')
+28
View File
@@ -0,0 +1,28 @@
/* eslint-env node */
/* eslint-disable no-console */
'use strict'
const process = require('node:process')
const lambdaTunnel = require('@lambdatest/node-tunnel')
if (process.env.LAMBDATEST !== 'true') {
console.log('Skipping lt-local script!')
return
}
const tunnelInstance = new lambdaTunnel() // eslint-disable-line new-cap
const tunnelArguments = {
user: process.env.LT_USERNAME,
key: process.env.LT_ACCESS_KEY,
tunnelName: process.env.LT_TUNNEL_NAME || 'jasmine',
logFile: 'local.log'
};
// eslint-disable-next-line unicorn/prefer-top-level-await
(async () => {
await tunnelInstance.start(tunnelArguments)
await new Promise(res => {
setTimeout(res, 5000)
})
})()
+10375 -3731
View File
File diff suppressed because it is too large Load Diff
+20 -11
View File
@@ -61,7 +61,7 @@
"js-compile-standalone-esm": "rollup --environment ESM:true,BUNDLE:false --config build/rollup.config.mjs --sourcemap",
"js-compile-bundle": "rollup --environment BUNDLE:true --config build/rollup.config.mjs --sourcemap",
"js-compile-plugins": "node build/build-plugins.mjs",
"js-lint": "xo --extension=html --extension=md",
"js-lint": "eslint --cache --cache-location .cache/.eslintcache --report-unused-disable-directives --ext .html,.js,.mjs,.md .",
"js-minify": "npm-run-all --aggregate-output --parallel js-minify-*",
"js-minify-standalone": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.js.map,includeSources,url=bootstrap.min.js.map\" --output dist/js/bootstrap.min.js dist/js/bootstrap.js",
"js-minify-standalone-esm": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.esm.js.map,includeSources,url=bootstrap.esm.min.js.map\" --output dist/js/bootstrap.esm.min.js dist/js/bootstrap.esm.js",
@@ -72,6 +72,9 @@
"js-test-integration-bundle": "rollup --config js/tests/integration/rollup.bundle.js",
"js-test-integration-modularity": "rollup --config js/tests/integration/rollup.bundle-modularity.js",
"js-test-cloud": "cross-env BROWSERSTACK=true npm run js-test-karma",
"js-test-lt-cloud": "cross-env LAMBDATEST=true npm-run-all --parallel --race js-test-lt-local js-test-karma",
"js-test-lt-local": "npm-run-all js-test-lt-tunnel sleep",
"js-test-lt-tunnel": "node js/tests/lt-local",
"js-test-jquery": "cross-env JQUERY=true npm run js-test-karma",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel js-lint css-lint lockfile-lint",
"docs": "npm-run-all docs-build docs-lint",
@@ -82,7 +85,7 @@
"docs-serve": "hugo server --port 9001 --disableFastRender --noHTTPCache --renderToMemory --printPathWarnings --printUnusedTemplates",
"docs-serve-only": "npx sirv-cli _site --port 9001",
"lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json",
"update-deps": "ncu -u -x jasmine,karma-browserstack-launcher,karma-rollup-preprocessor && echo Manually update site/assets/js/vendor",
"update-deps": "ncu -u -x globby,jasmine,karma-rollup-preprocessor && echo Manually update site/assets/js/vendor",
"release": "npm-run-all dist release-sri docs-build release-zip*",
"release-sri": "node build/generate-sri.mjs",
"release-version": "node build/change-version.mjs",
@@ -97,7 +100,8 @@
"watch-css-docs": "nodemon --watch site/assets/scss/ --ext scss --exec \"npm run css-lint\"",
"watch-css-test": "nodemon --watch scss/ --ext scss,js --exec \"npm run css-test\"",
"watch-js-main": "nodemon --watch js/src/ --ext js --exec \"npm-run-all js-lint js-compile\"",
"watch-js-docs": "nodemon --watch site/assets/js/ --ext js --exec \"npm run js-lint\""
"watch-js-docs": "nodemon --watch site/assets/js/ --ext js --exec \"npm run js-lint\"",
"sleep": "sleep 5"
},
"peerDependencies": {
"@popperjs/core": "^2.11.8"
@@ -106,6 +110,7 @@
"@babel/cli": "^7.23.9",
"@babel/core": "^7.24.0",
"@babel/preset-env": "^7.24.0",
"@lambdatest/node-tunnel": "^4.0.7",
"@popperjs/core": "^2.11.8",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
@@ -115,17 +120,21 @@
"bundlewatch": "^0.3.3",
"clean-css-cli": "^5.6.3",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint-config-xo": "^0.44.0",
"eslint-plugin-html": "^8.0.0",
"eslint-plugin-markdown": "^4.0.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-markdown": "^3.0.1",
"eslint-plugin-unicorn": "^51.0.1",
"find-unused-sass-variables": "^5.0.0",
"globby": "^14.0.1",
"globby": "^11.1.0",
"hammer-simulator": "0.0.1",
"hugo-bin": "^0.120.8",
"hugo-bin": "^0.120.7",
"ip": "^2.0.1",
"jasmine": "^5.1.0",
"jquery": "^3.7.1",
"karma": "^6.4.3",
"karma-browserstack-launcher": "1.4.0",
"karma-browserstack-launcher": "^1.6.0",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-detect-browsers": "^2.3.3",
@@ -133,12 +142,13 @@
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.1.0",
"karma-rollup-preprocessor": "7.0.7",
"karma-webdriver-launcher": "^1.0.8",
"lockfile-lint": "^4.13.2",
"nodemon": "^3.1.0",
"npm-run-all2": "^6.1.2",
"postcss": "^8.4.35",
"postcss-cli": "^11.0.0",
"rollup": "^4.13.0",
"rollup": "^4.12.0",
"rollup-plugin-istanbul": "^5.0.0",
"rtlcss": "^4.1.1",
"sass": "^1.71.1",
@@ -146,9 +156,8 @@
"shelljs": "^0.8.5",
"stylelint": "^16.2.1",
"stylelint-config-twbs-bootstrap": "^14.0.0",
"terser": "^5.29.1",
"vnu-jar": "23.4.11",
"xo": "^0.54.2"
"terser": "^5.27.2",
"vnu-jar": "23.4.11"
},
"files": [
"dist/{css,js}/*.{css,js,map}",
-1
View File
@@ -4,7 +4,6 @@ const path = require('node:path')
const runnerPath = path.join(__dirname, 'runner').replace(/\\/g, '/')
// eslint-disable-next-line n/no-deprecated-api
require.extensions['.scss'] = (module, filename) => {
const normalizedFilename = filename.replace(/\\/g, '/')
-1
View File
@@ -47,7 +47,6 @@
--docsearch-muted-color: var(--bs-secondary-color);
--docsearch-hit-shadow: none;
position: fixed;
z-index: 2000; // Make sure to be over all components showcased in the documentation
cursor: auto; // Needed because of [role="button"] in Algolia search modal. Remove once https://github.com/algolia/docsearch/issues/1370 is tackled.
+12 -18
View File
@@ -21,12 +21,12 @@ aliases: "/examples/"
{{ range $i, $example := $entry.examples -}}
{{- $len := len $entry.examples -}}
{{ if (eq $i 0) }}<div class="row">{{ end }}
{{ if $entry.external -}}
{{ if $entry.external }}
<div class="col-md-6 col-lg-4 mb-3 d-flex gap-3">
<svg class="bi fs-5 flex-shrink-0 mt-1"><use xlink:href="#box-seam"></use></svg>
<div>
<h3 class="h5 mb-1">
<a class="d-block link-offset-1" href="{{ urls.JoinPath $.Site.Params.github_org $example.url }}" target="_blank" rel="noopener">
<a class="d-block link-offset-1" href="{{ $.Site.Params.github_org }}{{ $example.url }}/" target="_blank" rel="noopener">
{{ $example.name }}
</a>
</h3>
@@ -43,29 +43,23 @@ aliases: "/examples/"
</p>
</div>
</div>
{{ else -}}
{{ else }}
<div class="col-sm-6 col-md-3 mb-3">
<a class="d-block link-offset-1" href="{{ urls.JoinPath "/docs" $.Site.Params.docs_version "/examples" ($example.name | urlize) "/"}}"{{ if in $example.name "RTL" }} hreflang="ar"{{ end }}>
{{ $imageBasePath := urls.JoinPath "/docs" $.Site.Params.docs_version "assets/img/examples" -}}
{{- $imgPath := urls.JoinPath $imageBasePath (printf "%s%s" ($example.name | urlize) ".png") -}}
{{- $imgPath2x := urls.JoinPath $imageBasePath (printf "%s%s" ($example.name | urlize) "@2x.png") -}}
{{- with (imageConfig (path.Join "/site/static" $imgPath)) -}}
<img class="img-thumbnail mb-3"
srcset="{{ $imgPath }}, {{ $imgPath2x }} 2x"
src="{{ $imgPath }}"
alt=""
width="{{ .Width }}"
height="{{ .Height }}"
loading="lazy">
{{- end }}
<a class="d-block link-offset-1" href="/docs/{{ $.Site.Params.docs_version }}/examples/{{ $example.name | urlize }}/"{{ if in $example.name "RTL" }} hreflang="ar"{{ end }}>
<img class="img-thumbnail mb-3" srcset="/docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}.png,
/docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}@2x.png 2x"
src="/docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}.png"
alt=""
width="480" height="300"
loading="lazy">
<h3 class="h5 mb-1">
{{ $example.name }}
</h3>
</a>
<p class="text-body-secondary">{{ $example.description }}</p>
</div>
{{- end }}
{{ if (eq (add $i 1) $len) }}</div>{{ end -}}
{{ end }}
{{ if (eq (add $i 1) $len) }}</div>{{ end }}
{{ end -}}
</div>
{{ end -}}
+1 -1
View File
@@ -158,7 +158,7 @@
{{ .Content }}
{{- if hugo.IsProduction -}}
{{- if eq hugo.Environment "production" -}}
<script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.min.js" {{ printf "integrity=%q" .Site.Params.cdn.js_bundle_hash | safeHTMLAttr }}></script>
{{- else -}}
<script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.js"></script>
+1 -1
View File
@@ -1 +1 @@
<script defer src="https://cdn.usefathom.com/script.js" data-site="{{ .Site.Params.analytics.fathom_site }}"></script>
<script defer src="https://cdn.usefathom.com/script.js" data-site="ITUSEYJG"></script>
+1 -1
View File
@@ -23,7 +23,7 @@
</button>
</div>
<div class="offcanvas-lg offcanvas-end flex-grow-1" tabindex="-1" id="bdNavbar" aria-labelledby="bdNavbarOffcanvasLabel">
<div class="offcanvas-lg offcanvas-end flex-grow-1" tabindex="-1" id="bdNavbar" aria-labelledby="bdNavbarOffcanvasLabel" data-bs-scroll="true">
<div class="offcanvas-header px-4 pb-0">
<h5 class="offcanvas-title text-white" id="bdNavbarOffcanvasLabel">Bootstrap</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="offcanvas" aria-label="Close" data-bs-target="#bdNavbar"></button>
+2 -2
View File
@@ -1,4 +1,4 @@
{{ if hugo.IsProduction -}}
{{ if eq hugo.Environment "production" -}}
<script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.min.js" {{ printf "integrity=%q" .Site.Params.cdn.js_bundle_hash | safeHTMLAttr }}></script>
{{ else -}}
<script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.js"></script>
@@ -15,7 +15,7 @@
{{- $targetDocsJSPath := path.Join "/docs" .Site.Params.docs_version "assets/js/docs.js" -}}
{{- $docsJs := append $js $vendor | resources.Concat $targetDocsJSPath -}}
{{- if hugo.IsProduction -}}
{{- if eq hugo.Environment "production" -}}
{{- $docsJs = $docsJs | resources.Minify -}}
{{- end }}
+2 -2
View File
@@ -1,6 +1,6 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3">
{{ if hugo.IsProduction -}}
{{ if eq hugo.Environment "production" -}}
{{ if eq .Page.Params.direction "rtl" -}}
<link href="/docs/{{ .Site.Params.docs_version }}/dist/css/bootstrap.rtl.min.css" rel="stylesheet" {{ printf "integrity=%q" .Site.Params.cdn.css_rtl_hash | safeHTMLAttr }}>
{{- else -}}
@@ -15,7 +15,7 @@
{{- $sassOptions := dict "targetPath" $targetDocsCssPath "outputStyle" "expanded" "precision" 6 -}}
{{- $postcssOptions := dict "use" "autoprefixer" "noMap" true -}}
{{ if hugo.IsProduction -}}
{{ if eq hugo.Environment "production" -}}
{{- $sassOptions = merge $sassOptions (dict "outputStyle" "compressed") -}}
{{- end -}}
+2 -1
View File
@@ -1,7 +1,8 @@
# www.robotstxt.org
{{- $isProduction := eq hugo.Environment "production" -}}
{{- $isNetlify := eq (getenv "NETLIFY") "true" -}}
{{- $allowCrawling := and (not $isNetlify) hugo.IsProduction -}}
{{- $allowCrawling := and (not $isNetlify) $isProduction -}}
{{ if $allowCrawling }}
# Allow crawling of all content