Skip to content
Draft
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b455e5d
feat: tools/build-css.js
crhallberg Sep 5, 2025
fc6b753
feat: no dependency warnings.
crhallberg Sep 5, 2025
34bae4d
remove: grunt
crhallberg Sep 5, 2025
701b109
tools: improve --help
crhallberg Sep 5, 2025
d952f67
tools: add --check-only. improve arguments and styles.
crhallberg Sep 5, 2025
8067ca4
tools: check only now doesn't run minify by default.
crhallberg Sep 8, 2025
077f5ea
ignore: add theme vendor, organize.
crhallberg Sep 9, 2025
00035b1
tools: use npm workspaces to handle installDeps and updateDeps.
crhallberg Sep 9, 2025
aa75835
Merge remote-tracking branch 'origin/dev' into v11-npm-scripts
crhallberg Sep 9, 2025
4fc37ef
fix: try catch in copyDependencies.
crhallberg Sep 9, 2025
ef4e7f4
chore: qa-js-and-scss
crhallberg Sep 9, 2025
47f7db3
tools: split build deps back out. Revert gitignore.
crhallberg Sep 17, 2025
8b199a3
feat: undo new dir
crhallberg Dec 2, 2025
d974d2f
feat: clearer time output
crhallberg Dec 2, 2025
b910754
fix: proper folder for bootstrap import
crhallberg Dec 2, 2025
42931a3
Merge branch 'dev' into v11-npm-scripts
demiankatz May 6, 2026
a136e47
fix: white space, docs, and deprecation in package.json
crhallberg May 7, 2026
2a63593
chore: npm lock (for comparison)
crhallberg May 7, 2026
0f1217f
style: reduce package-lock diffs
crhallberg May 7, 2026
14721dd
style: package.json indent
crhallberg May 7, 2026
b95905e
style: reorder package.json (diff reduction)
crhallberg May 7, 2026
9d8dc21
style: scss install before compile (diff reduction)
crhallberg May 7, 2026
ab2c354
style: rename updateDeps
crhallberg May 7, 2026
0108ab4
style: explain missing configs from reference CLI
crhallberg May 7, 2026
1532a3f
Merge branch 'dev' into v11-npm-scripts
crhallberg May 7, 2026
9bfeea3
Merge remote-tracking branch 'origin/dev' into v11-npm-scripts
demiankatz May 12, 2026
124f548
Make eslint happy.
demiankatz May 12, 2026
2590aff
Revert "ignore: add theme vendor, organize."
crhallberg May 12, 2026
9086e4e
fix: even less diff
crhallberg May 12, 2026
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
26 changes: 16 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,34 @@
# Vim temporary files
.*.sw[po]

# local config
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might make sense to move this reorganization of .gitignore to a separate PR, and just focus on removing the obsolete lines in this one. I think it's useful, but it obscures what is actually changing here. I also think some of the lines currently under the "QA files" comment really belong elsewhere -- but I don't want to distract from the work at hand sorting all that out here. :-)

local/DirLocations.ini
local/config/vufind.bak
local/config/vufind/*
!local/config/vufind/README.txt

# dependencies
composer.phar
/downloads
node_modules
themes/bootstrap5/css/vendor
themes/bootstrap5/js/vendor
themes/bootstrap5/scss/vendor
Comment thread
demiankatz marked this conversation as resolved.
Outdated
/vendor

# QA files
.php_cs_cache
.phpstan_cache
.vagrant
.vscode/*
/downloads
/Gruntfile.local.js
/solr/vendor
/themes/minktest
/vendor
ChangeLog
/TAGS
composer.phar
env.bat
env.sh
import/solrmarc.log*
lessphp_*.list
module/VuFind/tests/.phpunit*
node_modules
public/swagger-ui
tests/phpcs.cache.json
themes/bootstrap5/scss/vendor/bootstrap
local/DirLocations.ini
local/config/vufind.bak
local/config/vufind/*
!local/config/vufind/README.txt
141 changes: 0 additions & 141 deletions Gruntfile.js

This file was deleted.

5 changes: 0 additions & 5 deletions Gruntfile.local.js.dist

This file was deleted.

26 changes: 14 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,31 @@
"url": "https://vufind.org/jira"
},
"scripts": {
"build": "npm run build:css",
"watch": "npm run watch:css",
"postinstall": "npm run installDeps",
"installDeps": "npm run installDeps --workspaces --if-present --ignore-scripts",
"updateDeps": "npm run updateDeps --workspaces --if-present --ignore-scripts",

"build:css": "npm run build:scss",
"watch:css": "npm run watch:scss",
"build": "npm run build:scss",
Comment thread
demiankatz marked this conversation as resolved.
Outdated
"watch": "npm run watch:scss",

"install:scss-dependencies": "cd themes/bootstrap5 && npm run installBuildDeps",
"build:scss": "npm run install:scss-dependencies && grunt scss",
"check:scss": "npm run install:scss-dependencies && grunt check:scss",
"watch:scss": "npm run install:scss-dependencies && grunt watch:scss"
"build:scss": "node tools/build-css.js --minify",
"check:scss": "node tools/build-css.js --check-only",
"watch:scss": "nodemon --watch tools/ --watch themes/ --ext scss,js --exec \"node tools/build-css.js\""
},
"workspaces": [
"themes/bootstrap5"
],
"dependencies": {
"grunt": "^1.0.4",
"grunt-dart-sass": "^2.0.1",
"jit-grunt": "^0.10.0",
"clean-css": "^5.3.3",
Comment thread
demiankatz marked this conversation as resolved.
"commander": "^14.0.0",
"nodemon": "^3.1.10",
"sass": "1.72.0"
},
"devDependencies": {
"all-iso-language-codes": "^1.0.13",
"eslint": "^8.15.0",
"eslint-plugin-jsdoc": "50.2.2",
"eslint-plugin-no-jquery": "^2.7.0",
"grunt-contrib-watch": "^1.1.0",
"jshint": "^2.13.4"
}
}
4 changes: 2 additions & 2 deletions themes/bootstrap5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "vufind-bootstrap5",
"description": "Dependencies for the bootstrap5 theme",
"scripts": {
"installBuildDeps": "npm install --no-audit && node tools/copyDependencies.mjs --only-build-deps",
"updateDeps": "npm update && node tools/copyDependencies.mjs"
"installDeps": "npm install --no-audit && node tools/copyDependencies.js",
Comment thread
demiankatz marked this conversation as resolved.
Outdated
"updateDeps": "npm update && node tools/copyDependencies.js"
},
"dependencies": {
"@popperjs/core": "2.11.8",
Expand Down
64 changes: 64 additions & 0 deletions themes/bootstrap5/tools/copyDependencies.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*global __dirname, process, require */
/*eslint-disable no-console -- console needed for CLI output */

const { copyFileSync, cpSync, statSync } = require('node:fs');
const path = require('node:path');

/**
* Helper function to take from root, to theme
* @param {string} fromRelPath relative path to source
* @param {string} toRelPath relative path to destination
*/
function copy(fromRelPath, toRelPath) {
try {
const fromPath = path.join(process.env.VUFIND_HOME, fromRelPath);
const toPath = path.join(__dirname, "..", toRelPath);
console.log(`> ${toRelPath}`);

const stats = statSync(fromPath);
if (stats.isDirectory()) {
cpSync(fromPath, toPath, { recursive: true });
} else {
copyFileSync(fromPath, toPath);
}
} catch (e) {
console.log(`X ${toRelPath} (${e})`);
}
}

console.log('Copying bootstrap5 dependencies...');

// Bootstrap 5
copy('node_modules/bootstrap/scss/.', 'scss/vendor/bootstrap/scss/');
copy('node_modules/bootstrap/dist/js/bootstrap.min.js', 'js/vendor/bootstrap.min.js');

// Popper (Bootstrap 5 dependency)
copy('node_modules/@popperjs/core/dist/umd/popper.min.js', 'js/vendor/popper.min.js');

// autocomplete.js
copy('node_modules/autocomplete.js/autocomplete.js', 'js/vendor/autocomplete.js');

// chart.js
copy('node_modules/chart.js/dist/chart.umd.js', 'js/vendor/chart.js');

// jQuery
copy('node_modules/jquery/dist/jquery.min.js', 'js/vendor/jquery.min.js');

// libphonenumber-js
copy('node_modules/libphonenumber-js/bundle/libphonenumber-js.min.js', 'js/vendor/libphonenumber.js');
copy('node_modules/libphonenumber-js/LICENSE', 'js/vendor/libphonenumber-js_LICENSE');

// nouislider
copy('node_modules/nouislider/LICENSE.md', 'js/vendor/nouislider_LICENSE.md');
copy('node_modules/nouislider/dist/nouislider.min.js', 'js/vendor/nouislider.min.js');
copy('node_modules/nouislider/dist/nouislider.min.css', 'css/vendor/nouislider.min.css');

// simple-keyboard
copy('node_modules/simple-keyboard/build/index.js', 'js/vendor/simple-keyboard/index.js');
copy('node_modules/simple-keyboard/build/css/index.css', 'css/vendor/simple-keyboard/index.css');
copy('node_modules/simple-keyboard-layouts/build/index.js', 'js/vendor/simple-keyboard-layouts/index.js');

// vanilla-cookieconsent
copy('node_modules/vanilla-cookieconsent/dist/cookieconsent.umd.js', 'js/vendor/cookieconsent.umd.js');

console.log('= Done copying dependencies.');
52 changes: 0 additions & 52 deletions themes/bootstrap5/tools/copyDependencies.mjs

This file was deleted.

Loading