Include bootstrap and bootstrap icons in a single style bundle

This commit is contained in:
Eli Ribble 2026-03-21 03:33:11 +00:00
parent 16499fe23e
commit 0d6a6fa797
No known key found for this signature in database
111 changed files with 2171 additions and 51 deletions

View file

@ -6,10 +6,9 @@
<title>{{ template "title" . }} - Nidus Sync</title>
<link href="{{ bundlePathCSS }}" rel="stylesheet" />
<!-- Fontawesome Icons -->
<link rel="stylesheet" href="/static/vendor/css/bootstrap-icons.min.css" />
<link rel="icon" href="/static/ico/favicon-sync.ico" type="image/x-icon" />
<script src="/static/js/events.js"></script>
<script src="{{ bundlePathJS }}" defer></script>
<script src="{{ bundlePathJS }}"></script>
{{ block "extraheader" . }}{{ end }}
<script>
const USER = {{ .User.AsJSON|json }};

View file

@ -1,16 +0,0 @@
/* eslint-disable camelcase */
'use strict'
const path = require('node:path')
module.exports = {
spec_dir: 'scss',
// Make Jasmine look for `.test.scss` files
spec_files: ['**/*.{test,spec}.scss'],
// Compile them into JS scripts running `sass-true`
requires: [path.join(__dirname, 'sass-true/register')],
// Ensure we use `require` so that the require.extensions works
// as `import` completely bypasses it
jsLoader: 'require'
}

View file

@ -1,14 +0,0 @@
'use strict'
const path = require('node:path')
const runnerPath = path.join(__dirname, 'runner').replace(/\\/g, '/')
require.extensions['.scss'] = (module, filename) => {
const normalizedFilename = filename.replace(/\\/g, '/')
return module._compile(`
const runner = require('${runnerPath}')
runner('${normalizedFilename}', { describe, it })
`, filename)
}

View file

@ -1,17 +0,0 @@
'use strict'
const fs = require('node:fs')
const path = require('node:path')
const { runSass } = require('sass-true')
module.exports = (filename, { describe, it }) => {
const data = fs.readFileSync(filename, 'utf8')
const TRUE_SETUP = '$true-terminal-output: false; @import "true";'
const sassString = TRUE_SETUP + data
runSass(
{ describe, it, sourceType: 'string' },
sassString,
{ loadPaths: [path.dirname(filename)] }
)
}

View file

@ -49,7 +49,9 @@ i.bi svg {
height: 18px;
width: 18px;
}
@import "./bootstrap/scss/bootstrap";
@import "./vendor/bootstrap-5.3.8/scss/bootstrap";
$bootstrap-icons-font-dir: "/static/vendor/bootstrap-icons-1.13.1/fonts/";
@import "./vendor/bootstrap-icons-1.13.1/bootstrap-icons";
@import "./sidebar.scss";
@import "./table.scss";

View file

@ -0,0 +1,16 @@
/* eslint-disable camelcase */
"use strict";
const path = require("node:path");
module.exports = {
spec_dir: "scss",
// Make Jasmine look for `.test.scss` files
spec_files: ["**/*.{test,spec}.scss"],
// Compile them into JS scripts running `sass-true`
requires: [path.join(__dirname, "sass-true/register")],
// Ensure we use `require` so that the require.extensions works
// as `import` completely bypasses it
jsLoader: "require",
};

Some files were not shown because too many files have changed in this diff Show more