From 8ada5256587d15ec4f76547f5e5cba0c8b15364a Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 10 Sep 2020 11:44:58 -0400 Subject: [PATCH] LP#1778972: install Bootstrap skin's JS and CSS dependencies using npm Signed-off-by: Galen Charlton Signed-off-by: Jane Sandberg --- .../templates-bootstrap/opac/parts/base.tt2 | 8 ++--- .../src/templates-bootstrap/opac/parts/js.tt2 | 13 +++---- Open-ILS/web/opac/deps/package-lock.json | 36 +++++++++++++++++++ Open-ILS/web/opac/deps/package.json | 20 +++++++++++ build/tools/make_release | 7 ++++ .../pages/server_installation.adoc | 20 +++++++++++ 6 files changed, 92 insertions(+), 12 deletions(-) create mode 100644 Open-ILS/web/opac/deps/package-lock.json create mode 100644 Open-ILS/web/opac/deps/package.json diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/base.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/base.tt2 index 8c898b571c..5346346278 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/base.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/base.tt2 @@ -10,9 +10,9 @@ [% END %] - - - + + + + diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/js.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/js.tt2 index 488c95b412..6c86409dd9 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/js.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/js.tt2 @@ -176,16 +176,13 @@ var aou_hash = { - - - - - - - + + + + \ No newline at end of file + diff --git a/Open-ILS/web/opac/deps/package-lock.json b/Open-ILS/web/opac/deps/package-lock.json new file mode 100644 index 0000000000..efeefb7b57 --- /dev/null +++ b/Open-ILS/web/opac/deps/package-lock.json @@ -0,0 +1,36 @@ +{ + "name": "evg-opac-depes", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@fortawesome/fontawesome-free": { + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.14.0.tgz", + "integrity": "sha512-OfdMsF+ZQgdKHP9jUbmDcRrP0eX90XXrsXIdyjLbkmSBzmMXPABB8eobUJtivaupucYaByz6WNe1PI1JuYm3qA==" + }, + "bootstrap": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.3.1.tgz", + "integrity": "sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag==" + }, + "bootstrap-datepicker": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/bootstrap-datepicker/-/bootstrap-datepicker-1.9.0.tgz", + "integrity": "sha512-9rYYbaVOheGYxjOr/+bJCmRPihfy+LkLSg4fIFMT9Od8WwWB/MB50w0JO1eBgKUMbb7PFHQD5uAfI3ArAxZRXA==", + "requires": { + "jquery": ">=1.7.1 <4.0.0" + } + }, + "jquery": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", + "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==" + }, + "popper.js": { + "version": "1.12.9", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.12.9.tgz", + "integrity": "sha1-DfvC3/lsRRuzMu3Pz6r1ZtMx1bM=" + } + } +} diff --git a/Open-ILS/web/opac/deps/package.json b/Open-ILS/web/opac/deps/package.json new file mode 100644 index 0000000000..56ee6789a7 --- /dev/null +++ b/Open-ILS/web/opac/deps/package.json @@ -0,0 +1,20 @@ +{ + "name": "evg-opac-depes", + "version": "1.0.0", + "description": "Dependencies for Evergreen OPAC skins", + "main": "index.js", + "dependencies": { + "bootstrap": "~4.3.0", + "bootstrap-datepicker": "^1.9.0", + "@fortawesome/fontawesome-free": "^5.14.0", + "jquery": "~3.5.1", + "popper.js": "~1.12.9" + }, + "devDependencies": {}, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Evergreen Project", + "license": "GPL-2.0-or-later", + "private": true +} diff --git a/build/tools/make_release b/build/tools/make_release index 1b7b5e1c3d..19d1cf95dd 100755 --- a/build/tools/make_release +++ b/build/tools/make_release @@ -345,6 +345,12 @@ if [ "$BUILD_BROWSER_CLIENT" == "YES" ]; then rm -r node_modules cd ../../../../../ # Open-ILS dir + # OPAC dependencies + cd web/opac/deps + npm install # fetch dependencies + # and leave them in node_modules; there's no build step + cd ../../.. # Open-ILS dir + # Angular staff client echo "Building Angular browser staff client" cd src/eg2 @@ -353,6 +359,7 @@ if [ "$BUILD_BROWSER_CLIENT" == "YES" ]; then # npm cache is big and unnecessary in the final build. remove it. rm -rf node_modules cd ../../../../ # release dir + else echo "Skipping browser client build" cd ../../../../ diff --git a/docs/modules/installation/pages/server_installation.adoc b/docs/modules/installation/pages/server_installation.adoc index 44607b80b4..af4eb0d867 100644 --- a/docs/modules/installation/pages/server_installation.adoc +++ b/docs/modules/installation/pages/server_installation.adoc @@ -190,6 +190,26 @@ ng build --prod CHROME_BIN=/path/to/chrome npm run test ------------------------------------------------------------------------------ +[[install_opac_deps]] +=== Install OPAC skin dependencies === + +1. The following steps take place within the OPAC dependencies root: ++ +[source,sh] +------------------------------------------------------------------------------ +cd $EVERGREEN_ROOT/Open-ILS/web/opac/deps +------------------------------------------------------------------------------ ++ +2. Install Project-local Dependencies. npm inspects the 'package.json' file + for dependencies and fetches them from the Node package network. ++ +[source,sh] +------------------------------------------------------------------------------ +npm install # fetch JS and CSS dependencies +------------------------------------------------------------------------------ ++ +Note that there is no build step. + == Configuration and compilation instructions == For the time being, we are still installing everything in the `/openils/` -- 2.43.2