diff options
author | Daniel Schadt <kingdread@gmx.de> | 2023-03-22 20:34:48 +0100 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2023-03-22 20:47:53 +0100 |
commit | e694aaf332b3e6e7d86220936773c7818c5bd5aa (patch) | |
tree | a91d47aa37e0aba1b8e51696833b6f1bb4372802 | |
parent | 4c2856bbc6f33c6e1d175702eec2fbb4af6f7deb (diff) | |
download | fietsboek-e694aaf332b3e6e7d86220936773c7818c5bd5aa.tar.gz fietsboek-e694aaf332b3e6e7d86220936773c7818c5bd5aa.tar.bz2 fietsboek-e694aaf332b3e6e7d86220936773c7818c5bd5aa.zip |
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.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | justfile | 10 | ||||
-rw-r--r-- | package-lock.json | 65 | ||||
-rw-r--r-- | package.json | 6 |
4 files changed, 82 insertions, 0 deletions
@@ -27,3 +27,4 @@ poetry.toml /language-packs # The module docs are regenerated using sphinx-apidoc doc/developer/module/ +/node_modules @@ -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 diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..da91336 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,65 @@ +{ + "name": "fietsboek", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "bootstrap": "^5.2.3", + "bootstrap-icons": "^1.10.3" + } + }, + "node_modules/@popperjs/core": { + "version": "2.11.6", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz", + "integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/bootstrap": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.3.tgz", + "integrity": "sha512-cEKPM+fwb3cT8NzQZYEu4HilJ3anCrWqh3CHAok1p9jXqMPsPTBhU25fBckEJHJ/p+tTxTFTsFQGM+gaHpi3QQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ], + "peerDependencies": { + "@popperjs/core": "^2.11.6" + } + }, + "node_modules/bootstrap-icons": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.10.3.tgz", + "integrity": "sha512-7Qvj0j0idEm/DdX9Q0CpxAnJYqBCFCiUI6qzSPYfERMcokVuV9Mdm/AJiVZI8+Gawe4h/l6zFcOzvV7oXCZArw==" + } + }, + "dependencies": { + "@popperjs/core": { + "version": "2.11.6", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz", + "integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==", + "peer": true + }, + "bootstrap": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.3.tgz", + "integrity": "sha512-cEKPM+fwb3cT8NzQZYEu4HilJ3anCrWqh3CHAok1p9jXqMPsPTBhU25fBckEJHJ/p+tTxTFTsFQGM+gaHpi3QQ==", + "requires": {} + }, + "bootstrap-icons": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.10.3.tgz", + "integrity": "sha512-7Qvj0j0idEm/DdX9Q0CpxAnJYqBCFCiUI6qzSPYfERMcokVuV9Mdm/AJiVZI8+Gawe4h/l6zFcOzvV7oXCZArw==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..4f29baf --- /dev/null +++ b/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "bootstrap": "^5.2.3", + "bootstrap-icons": "^1.10.3" + } +} |