Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TASK-7099 - Migrate build of JSorolla to Webpack #1004

Merged
merged 46 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
333c539
webpack: initialize webpack configuration #TASK-7103 #TASK-7099
jmjuanes Oct 25, 2024
7a8bea4
pkg: Add webpack dependencies and update build and serve scripts #TAS…
jmjuanes Oct 25, 2024
a997255
webpack: Add webpack plugin for injecting global assets into generate…
jmjuanes Oct 25, 2024
a0f1063
webpack: Add webpack plugin to fix path of assets in html files #TASK…
jmjuanes Oct 25, 2024
5d3680c
webpack: Add plugin to inject build info header #TASK-7103 #TASK-7099
jmjuanes Oct 25, 2024
2bcd5d1
webpack: Allow to inject build info into generated html files #TASK-7…
jmjuanes Oct 25, 2024
c39681f
webpack: Fix getting default custom site path #TASK-7103 #TASK-7099
jmjuanes Oct 25, 2024
97a3616
scripts: Add a tiny server script #TASK-7103 #TASK-7099
jmjuanes Oct 25, 2024
125ab71
pkg: Remove unused webpack plugins #TASK-7103 #TASK-7099
jmjuanes Oct 25, 2024
bf62fc1
webpack: Change default port for dev server to 3000 #TASK-7103 #TASK-…
jmjuanes Oct 28, 2024
7bcc268
pkg: Fix default port for build server #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
f87ac11
webpack: Allow to customize the server port #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
be0fd11
webpack: Fix env variable to customize dev server port #TASK-7103 #TA…
jmjuanes Oct 28, 2024
b707d60
core: Remove usage of lodash methods in Region class #TASK-7103 #TASK…
jmjuanes Oct 28, 2024
46e51e6
clients: Useing native method ti get object keys in Cellbase client #…
jmjuanes Oct 28, 2024
7f1de88
wc: Remove empty line in data-form configuration for test-app #TASK-7…
jmjuanes Oct 28, 2024
c682491
iva: Clean index.html of iva app #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
a852a1b
iva: Import styles from iva-app #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
98a791c
test-app: Clean index.html of test-app #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
b3c8e65
test-app: Import styles from test-app #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
657ed68
wc: Remove unused initialization of deprecated bootstrap-select #TASK…
jmjuanes Oct 28, 2024
81e2054
css: Commented fonts in global.css #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
f726b51
docker: Do not copy api app into docker #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
93a0783
api: Remove api app from src/sites #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
0bcd7ec
iva: Remove unused stuff in iva app folder #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
a5237cc
test-app: Remove unused stuff in test-app folder #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
9968380
Merge branch 'develop' into TASK-7099
jmjuanes Oct 28, 2024
66e0687
vite: Remove vite configuration file #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
2a5112a
core: Remove unused stuff #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
1785ee2
server: Fix security issues in server script #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
aa256ef
scripts: Remove dependency-graph.sh #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
9e0f2c1
server: Fix crash of server script when the file does not exist #TASK…
jmjuanes Oct 28, 2024
c1cad32
pkg: Remove unused scripts in package.json #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
162b168
pkg: Remove rollup and vite dependencies #TASK-7103 #TASK-7099
jmjuanes Oct 28, 2024
486b38d
test: Remove unused dependencies in utils-test #TASK-7103 #TASK-7099
jmjuanes Oct 29, 2024
8f5fb6d
pkg: Remove unused dependencies and update versions #TASK-7103 #TASK-…
jmjuanes Oct 29, 2024
1767961
gb: Remove unused vendor files #TASK-7103 #TASK-7099
jmjuanes Oct 29, 2024
081d427
build: Remove unused babel configuration #TASK-7103 #TASK-7099
jmjuanes Oct 29, 2024
2558f91
webpack: Rename hash to contenthash in global assets plugin #TASK-710…
jmjuanes Oct 29, 2024
1489642
iva: Restore doctype tag in index.html #TASK-7103 #TASK-7099
jmjuanes Oct 29, 2024
b688228
test: Remove comment in index.html of test-app #TASK-7103 #TASK-7099
jmjuanes Oct 29, 2024
b0b4ef6
webpack: Remove commented globals in webpack config #TASK-7103 #TASK-…
jmjuanes Oct 29, 2024
c49354b
iva: Change type of script tag of extensions file #TASK-7103 #TASK-7099
jmjuanes Oct 29, 2024
c09cd3f
test: Change type of script tag of extensions file #TASK-7103 #TASK-7099
jmjuanes Oct 29, 2024
f6088c4
pkg: Upgrade webpack version to 5.96.1 #TASK-7103 #TASK-7099
jmjuanes Nov 5, 2024
240819a
webpack: Fix chunk format in webpack config #TASK-7103 #TASK-7099
jmjuanes Nov 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .babelrc

This file was deleted.

13 changes: 0 additions & 13 deletions cypress/support/utils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,11 @@
* limitations under the License.
*/

import UtilsNew from "../../src/core/utils-new.js";
import JSZip from "jszip";
import {TIMEOUT} from "./constants.js";


export default class UtilsTest {


static getFileJson = async (path, filename ) => {
try {
const zipFiles = await JSZip.loadAsync(UtilsNew.importBinaryFile(path));
const content = await zipFiles.file(filename).async("string");
return JSON.parse(content);
} catch (err) {
console.error("File not exist", err);
}
}

static getByDataTest = (selector, tag, ...args) => cy.get(`div[data-testid='${selector}'] ${tag ?? ""}`, ...args);

static setInput = (selectors, val) => {
Expand Down
23 changes: 0 additions & 23 deletions dependency-graph.sh

This file was deleted.

5 changes: 0 additions & 5 deletions docker/iva-app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ COPY ./${SITE}/iva/img /usr/local/apache2/htdocs/iva/img/

RUN true

## API
COPY ./build/api /usr/local/apache2/htdocs/api
COPY ./${SITE}/api/conf /usr/local/apache2/htdocs/api/conf/
COPY ./${SITE}/api/img /usr/local/apache2/htdocs/api/img/

## Genome Maps (Coming soon :-) )
#COPY ./build/genome-maps /usr/local/apache2/htdocs/genome-maps

Expand Down
85 changes: 16 additions & 69 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,113 +13,60 @@
},
"scripts": {
"serve": "npm run serve:dev",
"serve:dev": "vite",
"serve:build": "vite preview",
"serve:dev": "webpack serve",
"serve:build": "cross-env PORT=4000 node ./scripts/server.js",
"clean": "rm -rf build",
"build": "npm run clean && rollup -c && npm run package",
"build": "npm run clean && cross-env NODE_ENV=production webpack build",
"test:open": "cypress open",
"test:prepare": "./prepare-test.sh",
"test:run": "cypress run --spec cypress/e2e/commons/data-form.cy.js,cypress/e2e/iva/**/*.cy.js",
"browser-support": "npx browserslist",
"build-deprecated": "npm run clean && npm run dist && npx webpack && npm run package && npm run build-genome-browser",
"build-genome-browser-demo": "for i in `ls src/genome-browser/demo`; do cat src/genome-browser/demo/$i | sed 's/..\\/..\\/..\\/node_modules/vendors/' | sed 's/..\\/..\\/..\\/dist/dist/' | sed 's/..\\/webcomponent\\//webcomponent\\//'> build/genome-browser/$i; done",
"build-new-genome-browser-demo": "npx webpack --config webpack_genome.config.js",
"build-genome-browser": "mkdir -p build/genome-browser/vendors && npm run build-genome-browser-demo && cp -r dist src/genome-browser/webcomponent build/genome-browser && cp -r node_modules/jquery node_modules/qtip2 node_modules/urijs node_modules/cookies-js node_modules/crypto-js node_modules/underscore node_modules/backbone node_modules/@fortawesome/fontawesome-free node_modules/@webcomponents node_modules/@polymer build/genome-browser/vendors",
"webcomponents": "mkdir -p dist/js/webcomponents && cp -r src/webcomponents dist/js/",
"core": "mkdir -p dist/js/core && cd src/core && cat *.js bioinfo/*js cache/*.js clients/*.js clients/cellbase/*js data-source/*.js visualisation/*.js data-adapter/feature-adapter.js data-adapter/cellbase-adapter.js data-adapter/opencga-adapter.js data-adapter/feature-template-adapter.js widgets/*.js ../webcomponents/*.js ../webcomponents/opencga/*.js ../webcomponents/commons/*.js ../webcomponents/variant/*.js > ../../dist/js/core/core.js && cd ../.. && node_modules/uglify-js/bin/uglifyjs dist/js/core/core.js -o dist/js/core/core.min.js && npm run webcomponents",
"genome-browser": "mkdir -p dist/js/genome-browser && cd src/genome-browser && cp -r webcomponent ../../dist/js/genome-browser && cat *.js renderers/renderer.js renderers/*-renderer.js tracks/feature-track.js tracks/gene-track.js tracks/alignment-track.js tracks/variant-track.js tracks/tracklist-panel.js > ../../dist/js/genome-browser/genome-browser.js && cd ../.. && node_modules/uglify-js/bin/uglifyjs dist/js/genome-browser/genome-browser.js -o dist/js/genome-browser/genome-browser.min.js",
"dist": "npm run clean && mkdir -p dist/js && npm install && npm run core && npm run genome-browser && npm run styles",
"serve-deprecated": "wds --watch --open src/sites/iva --node-resolve",
"package": "mv build iva-$npm_package_version && tar zcvf iva-$npm_package_version.tar.gz iva-$npm_package_version && mv iva-$npm_package_version build",
"eslint": "eslint -c .eslintrc.json . --ignore-pattern '/web_modules/'",
"lint:js": "lint-staged",
"graph": "./dependency-graph.sh"
"eslint": "eslint -c .eslintrc.json . --ignore-pattern '/web_modules/'"
},
"license": "Apache-2.0",
"dependencies": {
"@eonasdan/tempus-dominus": "^6.7.11",
"@fortawesome/fontawesome-free": "^5.11.2",
"@highlightjs/cdn-assets": "^10.6.0",
"@polymer/polymer": "2.6.1",
"@popperjs/core": "^2.11.7",
"@svgdotjs/svg.js": "^3.0.16",
"@vaadin/router": "^1.7.2",
"animate.css": "^3.5.2",
"backbone": "~1.3.3",
"bootstrap": "^5.3.3",
"bootstrap-3-typeahead": "^4.0.2",
"bootstrap-colorpicker": "2.3.6",
"bootstrap-select": "1.14.0-beta3",
"bootstrap-table": "1.21.2",
"bootstrap-treeview": "[email protected]:jonmiles/bootstrap-treeview.git#develop",
"bootstrap-validator": "~0.11.9",
"clipboard": "^2.0.6",
"cookies-js": "^1.2.3",
"countup.js": "^2.0.8",
"crypto-js": "~3.1.9-1",
"cytoscape": "~2.5.4",
"file-saver": "~1.3.2",
"highcharts": "^8.0.4",
"highcharts": "^11.4.8",
"html-to-pdfmake": "^2.4.23",
"jquery": "~2.2.4",
"jquery.json-viewer": "^1.4.0",
"jszip": "^3.10.1",
"jquery": "^3.7.1",
"jwt-decode": "^2.2.0",
"lit": "^2.7.4",
"lodash": "^4.17.19",
"moment": "^2.15.1",
"pako": "~0.2.8",
"pdfmake": "^0.2.7",
"qtip2": "~3.0.3",
"select2": "^4.1.0-rc.0",
"select2-bootstrap-5-theme": "^1.3.0",
"sweetalert2": "^9.13.1",
"urijs": "~1.19.10",
"vanilla-jsoneditor": "^0.7.11"
},
"devDependencies": {
"@babel/core": "^7.15.5",
"@babel/plugin-transform-runtime": "^7.9.6",
"@babel/preset-env": "^7.15.4",
"@babel/runtime": "^7.15.4",
"@cypress/grep": "^3.1.5",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@rollup/plugin-replace": "^4.0.0",
"@rollup/plugin-terser": "^0.4.3",
"@web/rollup-plugin-html": "^1.10.1",
"babel-eslint": "^10.0.3",
"core-js": "^3.17.2",
"crisper": "~2.1.1",
"cypress": "^12.4.0",
"copy-webpack-plugin": "^12.0.2",
"cross-env": "^7.0.3",
"css-loader": "^7.1.2",
"cypress": "^13.15.1",
"cypress-mochawesome-reporter": "^3.2.3",
"cypress-wait-until": "^1.7.1",
"dependency-cruiser": "^10.0.7",
"eslint": "^7.29.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-cypress": "^2.10.3",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-lit": "^1.4.1",
"eslint-plugin-sort-class-members": "^1.11.0",
"eslint-plugin-wc": "^1.3.0",
"file-loader": "^5.0.2",
"grunt": "^1.4.0",
"grunt-shell": "^3.0.1",
"highlight.js": "^10.6.0",
"html-webpack-plugin": "^5.6.2",
"lint-staged": "^11.0.0",
"postcss": "^8.4.24",
"regenerator-runtime": "^0.13.3",
"rollup": "^2.56.3",
"rollup-plugin-cleaner": "^1.0.0",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-eslint": "^7.0.0",
"rollup-plugin-minify-html-literals": "^1.2.6",
"uglify-es": "~3.1.9",
"uglify-js": "^3.14.2",
"uglifycss": "0.0.29",
"vite": "^5.0.2",
"xmldom": "0.1.27"
"mime-types": "^2.1.35",
"mini-css-extract-plugin": "^2.9.1",
"webpack": "^5.96.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.1.0"
},
"browserslist": [
"chrome > 79",
Expand Down
Loading
Loading