Skip to content

Commit

Permalink
Build JS and fix config errors
Browse files Browse the repository at this point in the history
  • Loading branch information
muzzwood committed Oct 18, 2024
1 parent 92b340e commit 4a7852d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion assets/components/bigbrother/dist/dashboard.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/components/bigbrother/dist/dashboard.min.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion assets/components/bigbrother/mgr/bigbrother.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ Ext.extend(BigBrother,Ext.Component,{
},

renderPeriodDates(visitsChart) {
console.log(visitsChart['first_date']);
if (visitsChart['first_date'] && visitsChart['last_date']) {
let period = this.renderDate(visitsChart['first_date']) + ' - ' + this.renderDate(visitsChart['last_date']);
let element = document.querySelector('#bb-title-period');
Expand Down
26 changes: 13 additions & 13 deletions assets/components/bigbrother/package-lock.json

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

6 changes: 3 additions & 3 deletions assets/components/bigbrother/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"dependencies": {
"chart.js": "^3.3",
"chartjs-adapter-luxon": "^1.3",
"uglify-js": "^3.17"
"luxon": "^3.3",
"uglify-js": "^3.17",
"luxon": "^3.3"
},
"scripts": {
"build": "npm run build:js",
"build:js": "uglifyjs --compress --mangle --output dist/dashboard.min.js --source-map -- node_modules/chart.js/dist/chart.min.js node_modules/luxon/build/global/luxon.min.js node_modules/chartjs-adapter-luxon/dist/chartjs-adapter-luxon.min.js mgr/bigbrother.class.js mgr/reports/visits.js mgr/reports/key-metrics.js mgr/reports/acquisition.js mgr/reports/popular-pages.js mgr/reports/top-countries.js mgr/reports/top-referrers.js"
"build:js": "uglifyjs --compress --mangle --output dist/dashboard.min.js --source-map -- node_modules/chart.js/dist/chart.min.js node_modules/luxon/build/global/luxon.min.js node_modules/chartjs-adapter-luxon/dist/chartjs-adapter-luxon.umd.min.js mgr/bigbrother.class.js mgr/reports/visits.js mgr/reports/key-metrics.js mgr/reports/acquisition.js mgr/reports/popular-pages.js mgr/reports/top-countries.js mgr/reports/top-referrers.js"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected function initialize(): void
if ($this->modx->getOption('bigbrother.scripts_dev')) {
$this->controller->addJavascript($this->assetsUrl . 'node_modules/chart.js/dist/chart.js?v=' . urlencode($this->bigbrother->version));
$this->controller->addJavascript($this->assetsUrl . 'node_modules/luxon/build/global/luxon.min.js?v=' . urlencode($this->bigbrother->version));
$this->controller->addJavascript($this->assetsUrl . 'node_modules/chartjs-adapter-luxon/dist/chartjs-adapter-luxon.min.js?v=' . urlencode($this->bigbrother->version));
$this->controller->addJavascript($this->assetsUrl . 'node_modules/chartjs-adapter-luxon/dist/chartjs-adapter-luxon.umd.min.js?v=' . urlencode($this->bigbrother->version));
$this->controller->addJavascript($this->assetsUrl . 'mgr/bigbrother.class.js?v=' . urlencode($this->bigbrother->version));
$this->controller->addJavascript($this->assetsUrl . 'mgr/reports/visits.js?v=' . urlencode($this->bigbrother->version));
$this->controller->addJavascript($this->assetsUrl . 'mgr/reports/key-metrics.js?v=' . urlencode($this->bigbrother->version));
Expand Down

0 comments on commit 4a7852d

Please sign in to comment.