From e694aaf332b3e6e7d86220936773c7818c5bd5aa Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 22 Mar 2023 20:34:48 +0100 Subject: use npm to manage Javascript libraries I'm not the biggest fan of combining many package managers, but the JavaScript libraries (Bootstrap, Bootstrap-Icons, later the @types modules and Leaflet) are easy to get via npm, so maybe we can use that to our advantage and have npm at least download them. --- justfile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'justfile') diff --git a/justfile b/justfile index fc29e00..74af962 100644 --- a/justfile +++ b/justfile @@ -58,3 +58,13 @@ compile-language locale: # Extract new messages from the source files extract-messages: pybabel extract -F babel.cfg -o fietsboek/locale/fietslog.pot --input-dirs=fietsboek + +# Copy the assets from the NPM packages +copy-npm-assets: + # Bootstrap + cp node_modules/bootstrap/dist/js/bootstrap.bundle.min.js fietsboek/static/bootstrap.bundle.min.js + cp node_modules/bootstrap/dist/css/bootstrap.css fietsboek/static/bootstrap.css + # Bootstrap icons + cp node_modules/bootstrap-icons/font/bootstrap-icons.css fietsboek/static/bootstrap-icons.css + cp node_modules/bootstrap-icons/font/fonts/bootstrap-icons.woff fietsboek/static/fonts/bootstrap-icons.woff + cp node_modules/bootstrap-icons/font/fonts/bootstrap-icons.woff2 fietsboek/static/fonts/bootstrap-icons.woff2 -- cgit v1.2.3