Unverified Commit 3a3bbfb2 authored by Marius van den Beek's avatar Marius van den Beek Committed by GitHub
Browse files

Merge pull request #18311 from dannon/parcel-migration

[24.1] Update parcel-built visualizations to use parcel v2
parents 8df21c6a 1fc61408
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -32,5 +32,7 @@ jobs:
          path: 'galaxy root/static'
      - name: Build client
        if: steps.cache.outputs.cache-hit != 'true'
        env:
          GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR: 1
        run: make client
        working-directory: 'galaxy root'
+2 −2
Original line number Diff line number Diff line
@@ -167,14 +167,14 @@ packages/*/*.egg-info
config/plugins/**/static/dist
config/plugins/**/static/script.js
config/plugins/**/static/main.css
config/plugins/**/static/script.css
config/plugins/**/static/plugin_build_hash.txt
config/plugins/**/static/*.map

# Viz-specific build artifacts to ignore (until these are removed from codebase)
config/plugins/visualizations/annotate_image/static/jquery.contextMenu.css
config/plugins/visualizations/nvd3/nvd3_bar/static/nvd3.js
config/plugins/visualizations/h5web/static/script.css
config/plugins/visualizations/tiffviewer/static/script.css
config/plugins/visualizations/scatterplot/static/scatterplot.js

# CWL conformance tests
lib/galaxy_test/api/cwl/test_cwl_conformance_v1_?.py
+3 −1
Original line number Diff line number Diff line
@@ -13,10 +13,12 @@ OPEN_RESOURCE=bash -c 'open $$0 || xdg-open $$0'
SLIDESHOW_TO_PDF?=bash -c 'docker run --rm -v `pwd`:/cwd astefanutti/decktape /cwd/$$0 /cwd/`dirname $$0`/`basename -s .html $$0`.pdf'
YARN := $(shell $(IN_VENV) command -v yarn 2> /dev/null)
YARN_INSTALL_OPTS=--network-timeout 300000 --check-files
# Default to not fail on error, set to 1 to fail client builds on a plugin error.
GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR?=0
# Respect predefined NODE_OPTIONS, otherwise set maximum heap size low for
# compatibility with smaller machines.
NODE_OPTIONS ?= --max-old-space-size=3072
NODE_ENV = env NODE_OPTIONS=$(NODE_OPTIONS)
NODE_ENV = env NODE_OPTIONS=$(NODE_OPTIONS) GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR=$(GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR)	
CWL_TARGETS := test/functional/tools/cwl_tools/v1.0/conformance_tests.yaml \
	test/functional/tools/cwl_tools/v1.1/conformance_tests.yaml \
	test/functional/tools/cwl_tools/v1.2/conformance_tests.yaml \
+15 −2
Original line number Diff line number Diff line
@@ -27,16 +27,17 @@ const STATIC_PLUGIN_BUILD_IDS = [
    "msa",
    "mvpapp",
    "ngl",
    "nora",
    "nvd3/nvd3_bar",
    "openlayers",
    "openseadragon",
    "PCA_3Dplot",
    "phylocanvas",
    "pv",
    "nora",
    "venn",
    "scatterplot",
    "tiffviewer",
    "ts_visjs",
    "venn",
];
const DIST_PLUGIN_BUILD_IDS = ["new_user"];
const PLUGIN_BUILD_IDS = Array.prototype.concat(DIST_PLUGIN_BUILD_IDS, STATIC_PLUGIN_BUILD_IDS);
@@ -56,6 +57,11 @@ const PATHS = {
    },
};

const failOnError =
    process.env.GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR && process.env.GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR !== "0"
        ? true
        : false;

PATHS.pluginBaseDir =
    (process.env.GALAXY_PLUGIN_PATH && process.env.GALAXY_PLUGIN_PATH !== "None"
        ? process.env.GALAXY_PLUGIN_PATH
@@ -186,6 +192,13 @@ function buildPlugins(callback, forceRebuild) {
                console.error(
                    `Error building ${pluginName}, not saving build state.  Please report this issue to the Galaxy Team.`
                );
                if (failOnError) {
                    // Fail on error.
                    console.error(
                        "Failing build due to GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR being set, see error(s) above."
                    );
                    process.exit(1);
                }
            }
        }
    });
+4 −4
Original line number Diff line number Diff line
@@ -8,18 +8,18 @@
    ],
    "license": "AFL-3.0",
    "dependencies": {
        "babel-preset-env": "^1.6.1",
        "backbone": "^1.3.3",
        "jquery": "^3.3.1",
        "jquery-contextmenu": "^2.7.1",
        "jquery.ui.position": "^1.11.4",
        "paper": "^0.12.3",
        "parcel-bundler": "^1.4.1",
        "underscore": "^1.8.3"
    },
    "devDependencies": {
        "parcel": "2.12.0"
    },
    "scripts": {
        "build": "yarn build-css && yarn build-js",
        "build-css": "cp 'node_modules/jquery-contextmenu/dist/jquery.contextMenu.css' 'static/'",
        "build-js": "parcel build src/script.js -d static --no-source-maps"
        "build-js": "parcel build src/script.js --dist-dir static"
    }
}
Loading