Replies: 4 comments 11 replies
-
Hi @HaveF, Indeed I embedded external JS/CSS dependencies within datasette-dashboards to avoid external CDN calls (and protect privacy when using the plugin in secure contexts). I have been using extensively the Node.js ecosystem in the past, and I'd rather not include it with a Python project... Unless you can find a solution to the following:
{
"name": "datasette-dashboard",
"version": "0.6.2",
"description": "Datasette plugin providing data dashboards from metadata",
"dependencies": {
"vega": "^5.25.0",
"vega-embed": "^6.22.2",
"vega-lite": "^5.15.0"
}
}
I did not manage to achieve this but I'm open to a clean solution relying on package.json so that renovate can notify when new versions are availables |
Beta Was this translation helpful? Give feedback.
-
I just found out that Datasette has the same "problem" for CodeMirror and here is the implemented solution: The trick is to install node modules in a standard way (using the ./node_modules/.bin/rollup node_modules/vega/build/vega.min.js --file datasette_dashboards/static/vega.min.js I quickly tried it it seems to be working. And combined with a "postinstall" script performing the bundling in |
Beta Was this translation helpful? Give feedback.
-
Here is an experimental PR with the above workflow: #176 |
Beta Was this translation helpful? Give feedback.
-
JS dependencies are now tracked with A few caveats:
|
Beta Was this translation helpful? Give feedback.
-
The Vega/Lite JS file is embedded in the repository, making it difficult to update easily. Perhaps we can consider setting up a cron job in GitHub Actions to automate the updating process? Or just set a
package.json
for renovate notification?The reason for exploring this solution is because while debugging the graph today, I noticed some discrepancies between opening the Vega Editor via datasette-dashboards and viewing it in the dashboards.
https://github.com/vega/vega/releases
5.25.0
https://github.com/vega/vega-lite/releases
5.14.1
https://github.com/vega/vega-embed/releases
6.22.2
Our version maybe is this:
Beta Was this translation helpful? Give feedback.
All reactions