Compare commits

..

12 Commits

Author SHA1 Message Date
XhmikosR d0be5bf624 Move xo config to .xo-config.json 2024-03-13 22:11:06 +02:00
XhmikosR ada602d6ed Fix the new lint issues 2024-03-13 15:05:52 +02:00
XhmikosR e5fe48e3ff Switch to using xo directly 2024-03-13 15:05:52 +02:00
XhmikosR 545a650035 docs: move fathom site to hugo config (#39781) 2024-03-13 11:43:02 +02:00
Julien Déramond 3150c6985d Docs: fix Reddit URL to avoid redirection (#39777) 2024-03-12 16:10:02 +02:00
XhmikosR ab1a765f75 examples: assorted tweaks (#39772)
* remove trailing slash
* use urls.JoinPath
* reindent
* use `imageConfig` so that we add dimensions automatically
2024-03-12 11:42:03 +02:00
XhmikosR 13f40f1791 Switch to lockfile v3 2024-03-12 09:50:25 +02:00
XhmikosR 7b8211ce64 Update globby to v14
Also:

* fix globals type
* switch to async
2024-03-12 09:50:25 +02:00
XhmikosR 2bc395b563 Update devDependencies and regenerate package-lock.json
* eslint-plugin-markdown    ^3.0.1  →    ^4.0.1
* hugo-bin                ^0.120.7  →  ^0.120.8
* rollup                   ^4.12.0  →   ^4.13.0
* terser                   ^5.27.2  →   ^5.29.1
2024-03-12 09:50:25 +02:00
Julien Déramond 6ce0c62e21 Docs: drop data-bs-scroll="true" from navbar (#39766) 2024-03-11 09:26:03 +02:00
XhmikosR 930740afbc Switch to using hugo.IsProduction (#39763) 2024-03-08 12:41:17 +02:00
Louis-Maxime Piton f545964f8f Docs: fix position of search modal to avoid interface blocking at small breakpoints (#39739)
Co-authored-by: Julien Déramond <juderamond@gmail.com>
2024-03-08 09:04:12 +01:00
28 changed files with 3890 additions and 10777 deletions
-7
View File
@@ -1,7 +0,0 @@
**/*.min.js
**/dist/
**/vendor/
/_site/
/js/coverage/
/site/static/sw.js
/site/layouts/partials/
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
browserstack:
runs-on: ubuntu-latest
if: github.repository == 'twbs/bootstrap'
timeout-minutes: 15
timeout-minutes: 30
steps:
- name: Clone repository
-47
View File
@@ -1,47 +0,0 @@
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,4 +41,3 @@ Thumbs.db
/dist-sass/
/js/coverage/
/node_modules/
/.lambdatest/
-1
View File
@@ -1 +0,0 @@
lockfile-version=2
+24 -66
View File
@@ -1,11 +1,15 @@
{
"root": true,
"extends": [
"plugin:import/errors",
"plugin:import/warnings",
"plugin:unicorn/recommended",
"xo",
"xo/browser"
"envs": [
"browser"
],
"semicolon": false,
"space": 2,
"ignores": [
"**/*.min.js",
"**/dist/**",
"**/vendor/**",
"site/layouts/partials/",
"site/static/sw.js"
],
"rules": {
"arrow-body-style": "off",
@@ -21,36 +25,6 @@
"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",
@@ -67,7 +41,6 @@
}
],
"no-console": "error",
"no-negated-condition": "off",
"object-curly-spacing": [
"error",
"always"
@@ -78,26 +51,19 @@
],
"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-null": "off",
"unicorn/no-negated-condition": "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": [
@@ -105,10 +71,6 @@
"files": [
"build/**"
],
"env": {
"browser": false,
"node": true
},
"parserOptions": {
"sourceType": "module"
},
@@ -130,9 +92,6 @@
"js/tests/*.js",
"js/tests/integration/rollup*.js"
],
"env": {
"node": true
},
"parserOptions": {
"sourceType": "script"
}
@@ -141,9 +100,9 @@
"files": [
"js/tests/unit/**"
],
"env": {
"jasmine": true
},
"envs": [
"jasmine"
],
"rules": {
"no-console": "off",
"unicorn/consistent-function-scoping": "off",
@@ -173,9 +132,6 @@
"files": [
"scss/tests/**"
],
"env": {
"node": true
},
"parserOptions": {
"sourceType": "script"
}
@@ -184,17 +140,18 @@
"files": [
"site/**"
],
"env": {
"browser": true,
"node": false
},
"parserOptions": {
"sourceType": "script",
"ecmaVersion": 2019
},
"rules": {
"no-new": "off",
"unicorn/no-array-for-each": "off"
"strict": [
"error",
"function"
],
"unicorn/no-array-for-each": "off",
"unicorn/numeric-separators-style": "off"
}
},
{
@@ -208,9 +165,10 @@
},
{
"files": [
"**/*.md/*.js"
"**/*.md/*.js",
"**/*.md/*.mjs"
],
"extends": "plugin:markdown/recommended",
"extends": "plugin:markdown/recommended-legacy",
"parserOptions": {
"sourceType": "module"
},
+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://reddit.com/r/bootstrap).
- Discuss, ask questions, and more on [the community Discord](https://discord.gg/bZUvakRU3M) or [Bootstrap subreddit](https://www.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.
+6 -2
View File
@@ -7,9 +7,10 @@
*/
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'
@@ -17,7 +18,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 = globby.sync(`${sourcePath}/**/*.js`)
const jsFiles = await globby(`${sourcePath}/**/*.js`)
// Array which holds the resolved plugins
const resolvedPlugins = []
@@ -37,6 +38,9 @@ for (const file of jsFiles) {
}
const build = async plugin => {
/**
* @type {import('rollup').GlobalsOption}
*/
const globals = {}
const bundle = await rollup({
+1
View File
@@ -4,6 +4,7 @@ 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,6 +7,7 @@
*/
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,6 +67,9 @@ 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,6 +18,7 @@ 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,6 +11,7 @@
const elementMap = new Map()
// eslint-disable-next-line import/no-anonymous-default-export
export default {
set(element, key, instance) {
if (!elementMap.has(element)) {
+68 -142
View File
@@ -3,149 +3,75 @@
'use strict'
const browsers = {
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
}
safariMac: {
base: 'BrowserStack',
os: 'OS X',
os_version: 'Catalina',
browser: 'Safari',
browser_version: 'latest'
},
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
}
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
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
/* eslint-disable import/extensions, import/no-unassigned-import */
/* eslint-disable import/extensions, n/file-extension-in-import, import/no-unassigned-import */
import Tooltip from '../../dist/tooltip'
import '../../dist/carousel'
+10 -62
View File
@@ -1,6 +1,7 @@
'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')
@@ -9,21 +10,9 @@ 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'
@@ -66,23 +55,15 @@ const config = {
colors: true,
autoWatch: false,
singleRun: true,
captureTimeout: 180_000,
browserDisconnectTolerance: 3,
browserDisconnectTimeout: 180_000,
browserNoActivityTimeout: 400_000,
retryLimit: 2,
concurrency: 5,
concurrency: Number.POSITIVE_INFINITY,
client: {
clearContext: false,
jasmine: {
timeoutInterval: 120_000
}
clearContext: false
},
files: [
'node_modules/hammer-simulator/index.js',
{
pattern: 'js/tests/unit/**/!(jquery).spec.js',
watched: !BROWSERSTACK && !LAMBDATEST
watched: !BROWSERSTACK
}
],
preprocessors: {
@@ -118,51 +99,18 @@ const config = {
}
}
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) {
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'
project: 'Bootstrap',
retryLimit: 2
}
plugins.push('karma-browserstack-launcher', 'karma-jasmine-html-reporter')
config.customLaunchers = browsers.browserStack
config.browsers = Object.keys(browsers.browserStack)
config.customLaunchers = browsers
config.browsers = Object.keys(browsers)
reporters.push('BrowserStack', 'kjhtml')
} else if (JQUERY_TEST) {
frameworks.push('detectBrowsers')
-28
View File
@@ -1,28 +0,0 @@
/* 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)
})
})()
+3733 -10377
View File
File diff suppressed because it is too large Load Diff
+11 -20
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": "eslint --cache --cache-location .cache/.eslintcache --report-unused-disable-directives --ext .html,.js,.mjs,.md .",
"js-lint": "xo --extension=html --extension=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,9 +72,6 @@
"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",
@@ -85,7 +82,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 globby,jasmine,karma-rollup-preprocessor && echo Manually update site/assets/js/vendor",
"update-deps": "ncu -u -x jasmine,karma-browserstack-launcher,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",
@@ -100,8 +97,7 @@
"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\"",
"sleep": "sleep 5"
"watch-js-docs": "nodemon --watch site/assets/js/ --ext js --exec \"npm run js-lint\""
},
"peerDependencies": {
"@popperjs/core": "^2.11.8"
@@ -110,7 +106,6 @@
"@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",
@@ -120,21 +115,17 @@
"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-import": "^2.29.1",
"eslint-plugin-markdown": "^3.0.1",
"eslint-plugin-unicorn": "^51.0.1",
"eslint-plugin-markdown": "^4.0.1",
"find-unused-sass-variables": "^5.0.0",
"globby": "^11.1.0",
"globby": "^14.0.1",
"hammer-simulator": "0.0.1",
"hugo-bin": "^0.120.7",
"hugo-bin": "^0.120.8",
"ip": "^2.0.1",
"jasmine": "^5.1.0",
"jquery": "^3.7.1",
"karma": "^6.4.3",
"karma-browserstack-launcher": "^1.6.0",
"karma-browserstack-launcher": "1.4.0",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-detect-browsers": "^2.3.3",
@@ -142,13 +133,12 @@
"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.12.0",
"rollup": "^4.13.0",
"rollup-plugin-istanbul": "^5.0.0",
"rtlcss": "^4.1.1",
"sass": "^1.71.1",
@@ -156,8 +146,9 @@
"shelljs": "^0.8.5",
"stylelint": "^16.2.1",
"stylelint-config-twbs-bootstrap": "^14.0.0",
"terser": "^5.27.2",
"vnu-jar": "23.4.11"
"terser": "^5.29.1",
"vnu-jar": "23.4.11",
"xo": "^0.54.2"
},
"files": [
"dist/{css,js}/*.{css,js,map}",
+1
View File
@@ -4,6 +4,7 @@ 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,6 +47,7 @@
--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.
+18 -12
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="{{ $.Site.Params.github_org }}{{ $example.url }}/" target="_blank" rel="noopener">
<a class="d-block link-offset-1" href="{{ urls.JoinPath $.Site.Params.github_org $example.url }}" target="_blank" rel="noopener">
{{ $example.name }}
</a>
</h3>
@@ -43,23 +43,29 @@ 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="/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">
<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 }}
<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 eq hugo.Environment "production" -}}
{{- if hugo.IsProduction -}}
<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="ITUSEYJG"></script>
<script defer src="https://cdn.usefathom.com/script.js" data-site="{{ .Site.Params.analytics.fathom_site }}"></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" data-bs-scroll="true">
<div class="offcanvas-lg offcanvas-end flex-grow-1" tabindex="-1" id="bdNavbar" aria-labelledby="bdNavbarOffcanvasLabel">
<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 eq hugo.Environment "production" -}}
{{ if hugo.IsProduction -}}
<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 eq hugo.Environment "production" -}}
{{- if hugo.IsProduction -}}
{{- $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 eq hugo.Environment "production" -}}
{{ if hugo.IsProduction -}}
{{ 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 eq hugo.Environment "production" -}}
{{ if hugo.IsProduction -}}
{{- $sassOptions = merge $sassOptions (dict "outputStyle" "compressed") -}}
{{- end -}}
+1 -2
View File
@@ -1,8 +1,7 @@
# www.robotstxt.org
{{- $isProduction := eq hugo.Environment "production" -}}
{{- $isNetlify := eq (getenv "NETLIFY") "true" -}}
{{- $allowCrawling := and (not $isNetlify) $isProduction -}}
{{- $allowCrawling := and (not $isNetlify) hugo.IsProduction -}}
{{ if $allowCrawling }}
# Allow crawling of all content