Skip to content

Commit

Permalink
Issue #382: Replace local copy of Billboard.js with installed copy
Browse files Browse the repository at this point in the history
This reverts commit 2fdaebb.
  • Loading branch information
lkmorlan committed Apr 19, 2024
1 parent 1258200 commit ce921b2
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 23 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
html/*
!html/libraries/
html/libraries/*
!html/libraries/billboard/
!html/modules/
html/modules/*
!html/modules/custom/
Expand Down
19 changes: 19 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@
"type": "vcs",
"url": "https://github.com/openplus/opbb"
},
{
"type": "package",
"package": {
"name": "billboardjs/billboard",
"version": "3.10.3",
"type": "drupal-library",
"extra": {
"installer-name": "billboard"
},
"dist": {
"url": "https://registry.npmjs.org/billboard.js/-/billboard.js-3.10.3.tgz",
"type": "tar"
}
}
},
{
"type": "package",
"package": {
Expand Down Expand Up @@ -77,6 +92,7 @@
"require": {
"bcgov/bcbb": "1.0.x@dev",
"bcgov/bcbb_theme": "1.0.x@dev",
"billboardjs/billboard": "^3.10",
"composer/installers": "^2.2",
"d3/d3": "^7.8",
"drupal/auto_username": "^1.5",
Expand Down Expand Up @@ -146,16 +162,19 @@
"files": ["load.environment.php"]
},
"scripts": {
"clean-billboardjs": "./scripts/clean-billboardjs.sh",
"pre-install-cmd": [
"BCGovC\\MfinDataCatalogue\\ScriptHandler::checkComposerVersion"
],
"pre-update-cmd": [
"BCGovC\\MfinDataCatalogue\\ScriptHandler::checkComposerVersion"
],
"post-install-cmd": [
"@clean-billboardjs",
"BCGovC\\MfinDataCatalogue\\ScriptHandler::createRequiredFiles"
],
"post-update-cmd": [
"@clean-billboardjs",
"BCGovC\\MfinDataCatalogue\\ScriptHandler::createRequiredFiles"
]
},
Expand Down
14 changes: 13 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions html/libraries/billboard/dist/billboard.min.css

This file was deleted.

10 changes: 0 additions & 10 deletions html/libraries/billboard/dist/billboard.min.js

This file was deleted.

34 changes: 34 additions & 0 deletions scripts/clean-billboardjs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash
set -eu
declare -a directories=(
"html/libraries/billboard/dist-esm"
"html/libraries/billboard/src"
"html/libraries/billboard/types"
"html/libraries/billboard/dist/plugin"
"html/libraries/billboard/dist/theme"
)
counter=0
for directory in "${directories[@]}"
do
if [ -d $directory ]; then
echo "Deleting $directory"
rm -rf $directory
counter=$((counter+1))
fi
done
declare -a files=(
"html/libraries/billboard/CONTRIBUTING.md"
"html/libraries/billboard/README.md"
"html/libraries/billboard/LICENSE"
"html/libraries/billboard/package.json"
"html/libraries/billboard/dist/package.json"
)
counter=0
for file in "${files[@]}"
do
if [[ -f $file ]]; then
echo "Deleting $file"
rm $file
counter=$((counter+1))
fi
done

0 comments on commit ce921b2

Please sign in to comment.