Replace bower by nodejs to handle dependencies

Closes #13566
This commit is contained in:
José Antonio Díaz Miralles
2024-10-04 20:54:56 +02:00
parent f5d77c5420
commit 6bbf39afb4
10 changed files with 36 additions and 64 deletions
-4
View File
@@ -148,8 +148,6 @@ check-eslint:
cache:
paths:
- .cache/npm
before_script:
- sh .gitlab-scripts/bower_allow_root.sh
script:
- cd sao
- npm install --cache ${NODE_CACHE_DIR} --unsafe-perm --legacy-peer-deps
@@ -302,8 +300,6 @@ check-account-chart:
cache:
paths:
- .cache/npm
before_script:
- sh .gitlab-scripts/bower_allow_root.sh
script:
- cd "${PACKAGE}"
- npm -s install --cache ${NODE_CACHE_DIR} --unsafe-perm --legacy-peer-deps
-2
View File
@@ -1,2 +0,0 @@
#!/bin/sh
echo '{ "allow_root": true }' > ~/.bowerrc
-1
View File
@@ -4,7 +4,6 @@ syntax: glob
dist/
build/
node_modules/
bower_components/
.tox/
requirements.txt
requirements-dev.txt
+1
View File
@@ -1,3 +1,4 @@
* Remove bower dependency
* Allow tabs to be reordered
Version 7.8.0 - 2025-12-15
+4 -4
View File
@@ -30,10 +30,10 @@ module.exports = function(grunt) {
];
var less_paths = [
'src',
'bower_components',
'bower_components/bootstrap',
'bower_components/bootstrap/less',
'bower_components/bootstrap-rtl-ondemand/less',
'node_modules',
'node_modules/bootstrap',
'node_modules/bootstrap/less',
'node_modules/bootstrap-rtl-ondemand/less',
];
// Project configuration.
-29
View File
@@ -1,29 +0,0 @@
{
"name": "sao",
"version": "0.0.0",
"authors": [
"Tryton"
],
"description": "Web client for Tryton",
"license": "GPL",
"homepage": "http://www.tryton.org/",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"jquery": "^3",
"bootstrap": "^3.3.7",
"moment": "^2.10",
"gettext.js": "^2",
"c3": "^0.7",
"papaparse": "^5.0",
"fullcalendar": "^3.10.2",
"mousetrap": "^1.6",
"bootstrap-rtl-ondemand": "^3.3.4-ondemand",
"Sortable": "sortablejs#^1.8.4"
}
}
+15 -15
View File
@@ -9,22 +9,22 @@ this repository contains the full copyright notices and license terms. -->
<title>Tryton</title>
<link rel="icon" type="image/png" href="images/tryton-icon.png">
<script type="text/javascript" src="bower_components/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
<script type="text/javascript" src="bower_components/moment/moment.js"></script>
<script type="text/javascript" src="bower_components/moment/min/locales.js"></script>
<script type="text/javascript" src="bower_components/gettext.js/dist/gettext.iife.js"></script>
<script type="text/javascript" src="bower_components/d3/d3.js"></script>
<script type="text/javascript" src="bower_components/c3/c3.js"></script>
<script type="text/javascript" src="bower_components/papaparse/papaparse.js"></script>
<script type="text/javascript" src="bower_components/fullcalendar/dist/fullcalendar.js"></script>
<script type="text/javascript" src="bower_components/fullcalendar/dist/locale-all.js"></script>
<script type="text/javascript" src="bower_components/mousetrap/mousetrap.js"></script>
<script type="text/javascript" src="bower_components/mousetrap/plugins/pause/mousetrap-pause.js"></script>
<script type="text/javascript" src="bower_components/Sortable/Sortable.js"></script>
<script type="text/javascript" src="node_modules/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="node_modules/bootstrap/dist/js/bootstrap.js"></script>
<script type="text/javascript" src="node_modules/moment/moment.js"></script>
<script type="text/javascript" src="node_modules/moment/min/locales.js"></script>
<script type="text/javascript" src="node_modules/gettext.js/dist/gettext.iife.js"></script>
<script type="text/javascript" src="node_modules/d3/dist/d3.js"></script>
<script type="text/javascript" src="node_modules/c3/c3.js"></script>
<script type="text/javascript" src="node_modules/papaparse/papaparse.js"></script>
<script type="text/javascript" src="node_modules/fullcalendar/dist/fullcalendar.js"></script>
<script type="text/javascript" src="node_modules/fullcalendar/dist/locale-all.js"></script>
<script type="text/javascript" src="node_modules/mousetrap/mousetrap.js"></script>
<script type="text/javascript" src="node_modules/mousetrap/plugins/pause/mousetrap-pause.js"></script>
<script type="text/javascript" src="node_modules/sortablejs/Sortable.js"></script>
<link rel="stylesheet" href="bower_components/c3/c3.css">
<link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.css">
<link rel="stylesheet" href="node_modules/c3/c3.css">
<link rel="stylesheet" href="node_modules/fullcalendar/dist/fullcalendar.css">
<script type="text/javascript" src="dist/tryton-sao.js"></script>
<link rel="stylesheet" type="text/css" href="dist/tryton-sao.css" media="screen"/>
+11 -4
View File
@@ -22,7 +22,6 @@
"Gruntfile.js",
"LICENSE",
"README.md",
"bower.json",
"dist",
"images",
"sounds",
@@ -34,8 +33,7 @@
],
"scripts": {
"test": "npx grunt test -v",
"check": "npx eslint src tests",
"postinstall": "npx bower install"
"check": "npx eslint src tests"
},
"devDependencies": {
"eslint": "^9.24.0",
@@ -52,7 +50,16 @@
"tryton"
],
"dependencies": {
"bower": "^1.8.14",
"jquery": "^3",
"bootstrap": "^3.3.7",
"moment": "^2.10",
"gettext.js": "^2",
"c3": "^0.7",
"papaparse": "^5.0",
"fullcalendar": "^3.10.2",
"mousetrap": "^1.6",
"bootstrap-rtl-ondemand": "^3.3.4-ondemand",
"sortablejs": "^1.8.4",
"grunt": "^1.6",
"grunt-cli": "^1.5",
"grunt-contrib-concat": "^2.1",
+1 -1
View File
@@ -24,7 +24,7 @@
@panel-default-text: #fff;
@panel-default-heading-bg: @brand-primary;
@icon-font-path: "../bower_components/bootstrap/fonts/";
@icon-font-path: "../node_modules/bootstrap/fonts/";
@font-size-small: @font-size-base;
+4 -4
View File
@@ -4,10 +4,10 @@ this repository contains the full copyright notices and license terms. -->
<html>
<head>
<title>Sao Test Suite</title>
<script type="text/javascript" src="../bower_components/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="../bower_components/bootstrap/dist/js/bootstrap.js"></script>
<script type="text/javascript" src="../bower_components/moment/moment.js"></script>
<script type="text/javascript" src="../bower_components/gettext.js/dist/gettext.iife.js"></script>
<script type="text/javascript" src="../node_modules/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="../node_modules/bootstrap/dist/js/bootstrap.js"></script>
<script type="text/javascript" src="../node_modules/moment/moment.js"></script>
<script type="text/javascript" src="../node_modules/gettext.js/dist/gettext.iife.js"></script>
<script type="text/javascript" src="../node_modules/qunit/qunit/qunit.js"></script>
<link rel="stylesheet" type="text/css" href="../node_modules/qunit/qunit/qunit.css" media="screen"/>
<script type="text/javascript" src="../dist/tryton-sao.js"></script>