Use node packages to install jQuery and jQuery UI

Other packages depend on jQuery, so that's why these are the first one
we move from the Gemfile to the package.json file.

This way we can also test whether dependabot correctly opens pull
requests to update Node packages.

I've tried several configuration options for the asset pipeline in order
to be able to include images referenced in jQuery UI CSS files. So far,
adding the `node_modules/jquery-ui/themes/base` folder to the assets
paths is the only way I've found to make it work. Hopefully we can find
a better solution in the future so we don't have to study the internals
of every Node package in order to integrate it with the assets pipeline.
This commit is contained in:
Javi Martín
2023-09-08 16:02:35 +02:00
parent 421cbe5441
commit 3b6fb85c51
7 changed files with 75 additions and 44 deletions

25
package-lock.json generated
View File

@@ -4,7 +4,30 @@
"requires": true,
"packages": {
"": {
"name": "consuldemocracy"
"name": "consuldemocracy",
"dependencies": {
"jquery": "^3.6.0",
"jquery-ui": "^1.12.1",
"jquery-ujs": "^1.2.2"
}
},
"node_modules/jquery": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="
},
"node_modules/jquery-ui": {
"version": "1.12.1",
"resolved": "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.12.1.tgz",
"integrity": "sha512-K/kDBMXkTky5LH+gqbMvttU1ipqCTaecKyAFjwHjUnPTVfm5I5PZC7We31iNR3yWtAHNqoxkLoit06lR/gKVlA=="
},
"node_modules/jquery-ujs": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/jquery-ujs/-/jquery-ujs-1.2.2.tgz",
"integrity": "sha512-8AlF0ww/8mDdrT/Z2Nmv16r9LI2Xw/H3LiHNpPJYp4gnk/zIAfJTnhLcBRm6FZqQ/bWfW/rPl6j16lhO35DvOg==",
"dependencies": {
"jquery": ">=1.8.0"
}
}
}
}