1
0
Fork 0

Adding upstream version 1.10.4+dfsg.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-17 07:14:35 +01:00
parent 89ab270088
commit 720df8954d
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
32 changed files with 1682 additions and 9960 deletions

View file

@ -2,8 +2,8 @@
'use strict'
const fs = require('fs').promises
const path = require('path')
const fs = require('node:fs').promises
const path = require('node:path')
const picocolors = require('picocolors')
const iconsDir = path.join(__dirname, '../icons/')
@ -53,7 +53,7 @@ tags:
const filesLength = files.length
console.log(picocolors.green('\nSuccess, %s page%s prepared!'), filesLength, filesLength !== 1 ? 's' : '')
console.log(picocolors.green('\nSuccess, %s page%s prepared!'), filesLength, filesLength === 1 ? '' : 's')
console.timeEnd(timeLabel)
} catch (error) {
console.error(error)

View file

@ -2,9 +2,9 @@
'use strict'
const fs = require('fs').promises
const path = require('path')
const process = require('process')
const fs = require('node:fs').promises
const path = require('node:path')
const process = require('node:process')
const picocolors = require('picocolors')
const { loadConfig, optimize } = require('svgo')
@ -46,7 +46,7 @@ async function processFile(file, config) {
const filesLength = files.length
console.log(picocolors.green('\nSuccess, prepared %s icon%s!'), filesLength, filesLength !== 1 ? 's' : '')
console.log(picocolors.green('\nSuccess, prepared %s icon%s!'), filesLength, filesLength === 1 ? '' : 's')
console.timeEnd(timeLabel)
} catch (error) {
console.error(error)

59
build/check-icons.js Executable file
View file

@ -0,0 +1,59 @@
#!/usr/bin/env node
'use strict'
const fs = require('node:fs').promises
const path = require('node:path')
const process = require('node:process')
const picocolors = require('picocolors')
const fontJsonPath = path.join(__dirname, '../font/bootstrap-icons.json')
const iconsDir = path.join(__dirname, '../icons/')
;(async () => {
try {
const basename = path.basename(__filename)
const timeLabel = picocolors.cyan(`[${basename}] finished`)
console.log(picocolors.cyan(`[${basename}] started`))
console.time(timeLabel)
const fontJsonString = await fs.readFile(fontJsonPath, 'utf8')
const fontJson = JSON.parse(fontJsonString)
const svgFiles = await fs.readdir(iconsDir)
const jsonIconList = Object.keys(fontJson)
const svgIconList = svgFiles.map(svg => path.basename(svg, path.extname(svg)))
const onlyInJson = jsonIconList.filter(icon => !svgIconList.includes(icon))
const onlyInSvg = svgIconList.filter(icon => !jsonIconList.includes(icon))
if (onlyInJson.length === 0 || onlyInSvg === 0) {
console.log(picocolors.green('Success, found no differences!'))
console.timeEnd(timeLabel)
return
}
if (onlyInJson.length > 0) {
console.error(picocolors.red(`Found additional icons in ${fontJsonPath}:`))
for (const icon of onlyInJson) {
console.log(` - ${picocolors.red(icon)}`)
}
}
if (onlyInSvg.length > 0) {
console.error(picocolors.red('Found additional icons in SVG files:'))
for (const icon of onlyInSvg) {
console.log(` - ${picocolors.red(icon)}`)
}
}
process.exit(1)
} catch (error) {
console.error(error)
process.exit(1)
}
})()

View file

@ -1,3 +1,9 @@
/*!
* Bootstrap Icons (https://icons.getbootstrap.com/)
* Copyright 2019-2023 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/icons/blob/main/LICENSE.md)
*/
@font-face {
font-display: block;
font-family: "{{ name }}";

View file

@ -1,9 +1,15 @@
/*!
* Bootstrap Icons (https://icons.getbootstrap.com/)
* Copyright 2019-2023 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/icons/blob/main/LICENSE.md)
*/
${{ name }}-font: "{{ name }}" !default;
${{ name }}-font-dir: "{{ fontsUrl }}" !default;
${{ name }}-font-file: #{${{ name }}-font-dir}/#{${{ name }}-font} !default;
${{ name }}-font-file: "#{${{ name }}-font-dir}/#{${{ name }}-font}" !default;
${{ name }}-font-hash: "24e3eb84d0bcaf83d77f904c78ac1f47" !default;
${{ name }}-font-src: url("#{${{ name }}-font-file}.woff2?#{${{ name }}-font-hash}") format("woff2"),
url("#{${{ name }}-font-file}.woff?#{${{ name }}-font-hash}") format("woff") !default;
url("#{${{ name }}-font-file}.woff?#{${{ name }}-font-hash}") format("woff") !default;
@font-face {
font-display: block;
@ -32,6 +38,6 @@ ${{ name }}-map: (
{{/ each }}
);
{{# each codepoints }}
.{{ ../prefix }}-{{ @key }}::before { content: map-get(${{ ../name }}-map, "{{ @key }}"); }
{{/ each }}
@each $icon, $codepoint in ${{ name }}-map {
.{{ prefix }}-#{$icon}::before { content: $codepoint; }
}

View file

@ -2,22 +2,24 @@
/*!
* Script to run vnu-jar if Java is available.
* Copyright 2017-2022 The Bootstrap Authors
* Copyright 2017-2022 Twitter, Inc.
* Copyright 2017-2023 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
'use strict'
const { execFile, spawn } = require('child_process')
const { execFile, spawn } = require('node:child_process')
const vnu = require('vnu-jar')
execFile('java', ['-version'], (error, stdout, stderr) => {
if (error) {
console.error('Skipping vnu-jar test; Java is missing.')
console.error('Skipping vnu-jar test; Java is probably missing.')
console.error(error)
return
}
console.log('Running vnu-jar validation...')
const is32bitJava = !/64-Bit/.test(stderr)
// vnu-jar accepts multiple ignores joined with a `|`.
@ -40,6 +42,8 @@ execFile('java', ['-version'], (error, stdout, stderr) => {
args.splice(0, 0, '-Xss512k')
}
console.log(`command used: java ${args.join(' ')}`)
return spawn('java', args, {
shell: true,
stdio: 'inherit'