From a8a28bfc7df0add4f606e6bd711dfd02c071fa38 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 9 Mar 2023 18:17:30 +1100 Subject: [PATCH 1/6] Added field mappings document. [skip ci] --- .../custom/civictheme_migrate/MAPPINGS.md | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 docroot/modules/custom/civictheme_migrate/MAPPINGS.md diff --git a/docroot/modules/custom/civictheme_migrate/MAPPINGS.md b/docroot/modules/custom/civictheme_migrate/MAPPINGS.md new file mode 100644 index 000000000..28a68af43 --- /dev/null +++ b/docroot/modules/custom/civictheme_migrate/MAPPINGS.md @@ -0,0 +1,50 @@ +This document is used as a starting point to define a “contract” between field names provided in MerlinUI when defining extractors so that consumer migration modules could define such field as “source” fields. + +It is a WIP - will be filled-in progressively. + +Status: +- DRAFT - field mapping is proposed for review +- IN REVIEW - field mapping is in review by all parties +- APPROVED - field mapping is approved and ready to be used + + +| Merlin UI1 | Description | Merlin type | Other settings | Status | CivicTheme | SDP Tide | +|-----------------------------------|-----------------------------------------|-------------|----------------|----------|------------|----------| +| id | Page ID (Migration ID) | uuid | Required | draft | | | +| id | id | | | | | | +| title | Page title | text | Required | Approved | | | +| title | title | | | | | | +| alias | Page URL alias | alias | | draft | | | +| path/alias | path/alias | | | | | | +| summary | Page Summary | text | | draft | | | +| field_n_summary | | | | | | | +| topics | Topics (comma separated list of topics) | text | | draft | | | +| field_c_n_topics | | | | | | | +| thumbnail | Thumbnail | Media | | draft | | | +| field_c_n_thumbnail | | | | | | | +| vertical_spacing | Vertical spacing | text | | draft | | | +| field_c_n_vertical_spacing | | | | | | | +| hide_sidebar | Hide sidebar | boolean | | draft | | | +| field_c_n_hide_sidebar | | | | | | | +| show_last_updated_date | Show last updated date | | | draft | | | +| field_c_n_show_last_updated | | | | | | | +| last_updated_date | Last updated date | | | draft | | | +| field_c_n_custom_last_updated | | | | | | | +| show_toc | Show table of contents | | | draft | | | +| field_c_n_show_toc | | | | | | | +| banner | Container for banner items | container | | draft | | | +| | | | | | | | +| banner.theme | Banner theme | | | draft | | | +| field_c_n_banner_theme | | | | | | | +| banner.title | Banner title | text | | draft | | | +| field_c_n_banner_title | | | | | | | +| banner.banner_type | Banner type | text | | draft | | | +| field_c_n_banner_type | | | | | | | +| banner.blend_mode | Banner blend mode | | | draft | | | +| field_c_n_blend_mode | | | | | | | +| banner.featured_image | Banner featured image | Media | | draft | | | +| field_c_n_banner_featured_image | | | | | | | +| banner.background | Banner background image | Media | | draft | | | +| field_c_n_banner_background_image | | | | | | | +| banner.hide_breadcrumb | Hide breadcrumb | boolean | | draft | | | +| field_c_n_hide_breadcrumb | | | | | | | From 9087f83cc129ce7e82d68cb2cc6a3b466b38a994 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Fri, 10 Mar 2023 05:42:22 +1100 Subject: [PATCH 2/6] Fixed mapping table. [skip ci] --- .../custom/civictheme_migrate/MAPPINGS.md | 71 +++++++------------ 1 file changed, 25 insertions(+), 46 deletions(-) diff --git a/docroot/modules/custom/civictheme_migrate/MAPPINGS.md b/docroot/modules/custom/civictheme_migrate/MAPPINGS.md index 28a68af43..54b133d16 100644 --- a/docroot/modules/custom/civictheme_migrate/MAPPINGS.md +++ b/docroot/modules/custom/civictheme_migrate/MAPPINGS.md @@ -1,50 +1,29 @@ -This document is used as a starting point to define a “contract” between field names provided in MerlinUI when defining extractors so that consumer migration modules could define such field as “source” fields. - -It is a WIP - will be filled-in progressively. +This document is used as a starting point to define a "contract" between field names provided in MerlinUI when defining extractors so that consumer migration modules could define such field as "source" fields. Status: -- DRAFT - field mapping is proposed for review -- IN REVIEW - field mapping is in review by all parties -- APPROVED - field mapping is approved and ready to be used +- `draft` - field mapping is proposed for a review +- `in review` - field mapping is in review by all parties +- `approved` - field mapping is approved and ready to be used -| Merlin UI1 | Description | Merlin type | Other settings | Status | CivicTheme | SDP Tide | -|-----------------------------------|-----------------------------------------|-------------|----------------|----------|------------|----------| -| id | Page ID (Migration ID) | uuid | Required | draft | | | -| id | id | | | | | | -| title | Page title | text | Required | Approved | | | -| title | title | | | | | | -| alias | Page URL alias | alias | | draft | | | -| path/alias | path/alias | | | | | | -| summary | Page Summary | text | | draft | | | -| field_n_summary | | | | | | | -| topics | Topics (comma separated list of topics) | text | | draft | | | -| field_c_n_topics | | | | | | | -| thumbnail | Thumbnail | Media | | draft | | | -| field_c_n_thumbnail | | | | | | | -| vertical_spacing | Vertical spacing | text | | draft | | | -| field_c_n_vertical_spacing | | | | | | | -| hide_sidebar | Hide sidebar | boolean | | draft | | | -| field_c_n_hide_sidebar | | | | | | | -| show_last_updated_date | Show last updated date | | | draft | | | -| field_c_n_show_last_updated | | | | | | | -| last_updated_date | Last updated date | | | draft | | | -| field_c_n_custom_last_updated | | | | | | | -| show_toc | Show table of contents | | | draft | | | -| field_c_n_show_toc | | | | | | | -| banner | Container for banner items | container | | draft | | | -| | | | | | | | -| banner.theme | Banner theme | | | draft | | | -| field_c_n_banner_theme | | | | | | | -| banner.title | Banner title | text | | draft | | | -| field_c_n_banner_title | | | | | | | -| banner.banner_type | Banner type | text | | draft | | | -| field_c_n_banner_type | | | | | | | -| banner.blend_mode | Banner blend mode | | | draft | | | -| field_c_n_blend_mode | | | | | | | -| banner.featured_image | Banner featured image | Media | | draft | | | -| field_c_n_banner_featured_image | | | | | | | -| banner.background | Banner background image | Media | | draft | | | -| field_c_n_banner_background_image | | | | | | | -| banner.hide_breadcrumb | Hide breadcrumb | boolean | | draft | | | -| field_c_n_hide_breadcrumb | | | | | | | +| Merlin UI | Description | Merlin type | Other settings | Status | CivicTheme | +|-------------------------|-----------------------------------------|-------------|----------------|----------|-----------------------------------| +| id | Page ID (Migration ID) | uuid | Required | draft | id | +| title | Page title | text | Required | approved | title | +| alias | Page URL alias | alias | Required | draft | path/alias | +| summary | Page Summary | text | | draft | field_n_summary | +| topics | Topics (comma separated list of topics) | text | | draft | field_c_n_topics | +| thumbnail | Thumbnail | Media | | draft | field_c_n_thumbnail | +| vertical_spacing | Vertical spacing | text | | draft | field_c_n_vertical_spacing | +| hide_sidebar | Hide sidebar | boolean | | draft | field_c_n_hide_sidebar | +| show_last_updated_date | Show last updated date | | | draft | field_c_n_show_last_updated | +| last_updated_date | Last updated date | | | draft | field_c_n_custom_last_updated | +| show_toc | Show table of contents | | | draft | field_c_n_show_toc | +| banner | Container for banner items | container | Required | draft | | +| banner.theme | Banner theme | | | draft | field_c_n_banner_theme | +| banner.title | Banner title | text | Required | draft | field_c_n_banner_title | +| banner.banner_type | Banner type | text | | draft | field_c_n_banner_type | +| banner.blend_mode | Banner blend mode | | | draft | field_c_n_blend_mode | +| banner.featured_image | Banner featured image | Media | | draft | field_c_n_banner_featured_image | +| banner.background | Banner background image | Media | | draft | field_c_n_banner_background_image | +| banner.hide_breadcrumb | Hide breadcrumb | boolean | | draft | field_c_n_hide_breadcrumb | From 275a5253469ace64ec6f977876a851e95f480ed2 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Fri, 10 Mar 2023 05:44:10 +1100 Subject: [PATCH 3/6] Updated PR template. [skip ci] --- .github/PULL_REQUEST_TEMPLATE.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 10269e883..ec268bff6 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,3 @@ -https://salsadigital.atlassian.net/browse/CIVIC- - ## Checklist before requesting a review - [ ] I have formatted the subject to include ticket number as `[CIVIC-123] Verb in past tense with dot at the end.` From 102aae518a20f3e6eac6eea754855461852eb0f7 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Fri, 10 Mar 2023 05:46:45 +1100 Subject: [PATCH 4/6] Updated mapping table. [skip ci] --- .../custom/civictheme_migrate/MAPPINGS.md | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/docroot/modules/custom/civictheme_migrate/MAPPINGS.md b/docroot/modules/custom/civictheme_migrate/MAPPINGS.md index 54b133d16..ea0fd3b04 100644 --- a/docroot/modules/custom/civictheme_migrate/MAPPINGS.md +++ b/docroot/modules/custom/civictheme_migrate/MAPPINGS.md @@ -6,24 +6,24 @@ Status: - `in review` - field mapping is in review by all parties - `approved` - field mapping is approved and ready to be used -| Merlin UI | Description | Merlin type | Other settings | Status | CivicTheme | -|-------------------------|-----------------------------------------|-------------|----------------|----------|-----------------------------------| -| id | Page ID (Migration ID) | uuid | Required | draft | id | -| title | Page title | text | Required | approved | title | -| alias | Page URL alias | alias | Required | draft | path/alias | -| summary | Page Summary | text | | draft | field_n_summary | -| topics | Topics (comma separated list of topics) | text | | draft | field_c_n_topics | -| thumbnail | Thumbnail | Media | | draft | field_c_n_thumbnail | -| vertical_spacing | Vertical spacing | text | | draft | field_c_n_vertical_spacing | -| hide_sidebar | Hide sidebar | boolean | | draft | field_c_n_hide_sidebar | -| show_last_updated_date | Show last updated date | | | draft | field_c_n_show_last_updated | -| last_updated_date | Last updated date | | | draft | field_c_n_custom_last_updated | -| show_toc | Show table of contents | | | draft | field_c_n_show_toc | -| banner | Container for banner items | container | Required | draft | | -| banner.theme | Banner theme | | | draft | field_c_n_banner_theme | -| banner.title | Banner title | text | Required | draft | field_c_n_banner_title | -| banner.banner_type | Banner type | text | | draft | field_c_n_banner_type | -| banner.blend_mode | Banner blend mode | | | draft | field_c_n_blend_mode | -| banner.featured_image | Banner featured image | Media | | draft | field_c_n_banner_featured_image | -| banner.background | Banner background image | Media | | draft | field_c_n_banner_background_image | -| banner.hide_breadcrumb | Hide breadcrumb | boolean | | draft | field_c_n_hide_breadcrumb | +| Merlin UI | Description | Merlin type | Other settings | Status | CivicTheme | +|--------------------------|-----------------------------------------|-------------|----------------|----------|-------------------------------------| +| `id` | Page ID (Migration ID) | `uuid` | Required | draft | `id` | +| `title` | Page title | `text` | Required | approved | `title` | +| `alias` | Page URL alias | `alias` | Required | draft | `alias` | +| `summary` | Page Summary | `text` | | draft | `field_n_summary` | +| `topics` | Topics (comma separated list of topics) | `text` | | draft | `field_c_n_topics` | +| `thumbnail` | Thumbnail | `Media` | | draft | `field_c_n_thumbnail` | +| `vertical_spacing` | Vertical spacing | `text` | | draft | `field_c_n_vertical_spacing` | +| `hide_sidebar` | Hide sidebar | `boolean` | | draft | `field_c_n_hide_sidebar` | +| `show_last_updated_date` | Show last updated date | | | draft | `field_c_n_show_last_updated` | +| `last_updated_date` | Last updated date | | | draft | `field_c_n_custom_last_updated` | +| `show_toc` | Show table of contents | | | draft | `field_c_n_show_toc` | +| `banner` | Container for banner items | `container` | Required | draft | | +| `banner.theme` | Banner theme | | | draft | `field_c_n_banner_theme` | +| `banner.title` | Banner title | `text` | Required | draft | `field_c_n_banner_title` | +| `banner.banner_type` | Banner type | `text` | | draft | `field_c_n_banner_type` | +| `banner.blend_mode` | Banner blend mode | | | draft | `field_c_n_blend_mode` | +| `banner.featured_image` | Banner featured image | `Media` | | draft | `field_c_n_banner_featured_image` | +| `banner.background` | Banner background image | `Media` | | draft | `field_c_n_banner_background_image` | +| `banner.hide_breadcrumb` | Hide breadcrumb | `boolean` | | draft | `field_c_n_hide_breadcrumb` | From 233cfcec9cf03943231bdc8f1d37460772cef21b Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Fri, 10 Mar 2023 17:22:58 +1100 Subject: [PATCH 5/6] Updated SCSS extractor package namespace. --- .../contrib/civictheme/.storybook/importer.scss_variables.js | 2 +- .../civictheme_library/.storybook/importer.scss_variables.js | 2 +- .../themes/contrib/civictheme/civictheme_library/package.json | 2 +- .../.storybook/importer.scss_variables.js | 2 +- .../contrib/civictheme/civictheme_starter_kit/package.json | 2 +- docroot/themes/contrib/civictheme/package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docroot/themes/contrib/civictheme/.storybook/importer.scss_variables.js b/docroot/themes/contrib/civictheme/.storybook/importer.scss_variables.js index 71077cded..ec36de64c 100644 --- a/docroot/themes/contrib/civictheme/.storybook/importer.scss_variables.js +++ b/docroot/themes/contrib/civictheme/.storybook/importer.scss_variables.js @@ -3,7 +3,7 @@ // Extract CSS variables as object from SCSS file. // const fs = require('fs'); -const extractor = require('@integratedexperts/scss-variables-extractor'); +const extractor = require('@alexskrypnyk/scss-variables-extractor'); const files = [ './components/00-base/_variables.base.scss', diff --git a/docroot/themes/contrib/civictheme/civictheme_library/.storybook/importer.scss_variables.js b/docroot/themes/contrib/civictheme/civictheme_library/.storybook/importer.scss_variables.js index 71077cded..ec36de64c 100644 --- a/docroot/themes/contrib/civictheme/civictheme_library/.storybook/importer.scss_variables.js +++ b/docroot/themes/contrib/civictheme/civictheme_library/.storybook/importer.scss_variables.js @@ -3,7 +3,7 @@ // Extract CSS variables as object from SCSS file. // const fs = require('fs'); -const extractor = require('@integratedexperts/scss-variables-extractor'); +const extractor = require('@alexskrypnyk/scss-variables-extractor'); const files = [ './components/00-base/_variables.base.scss', diff --git a/docroot/themes/contrib/civictheme/civictheme_library/package.json b/docroot/themes/contrib/civictheme/civictheme_library/package.json index c1596a58f..1d2cfbcc3 100644 --- a/docroot/themes/contrib/civictheme/civictheme_library/package.json +++ b/docroot/themes/contrib/civictheme/civictheme_library/package.json @@ -33,7 +33,7 @@ "devDependencies": { "@babel/cli": "^7.15.4", "@babel/core": "^7.15.5", - "@integratedexperts/scss-variables-extractor": "^0.1.0", + "@alexskrypnyk/scss-variables-extractor": "^0.1.0", "@storybook/addon-a11y": "^6.1.18", "@storybook/addon-essentials": "^6.3.8", "@storybook/addon-knobs": "^6.3.1", diff --git a/docroot/themes/contrib/civictheme/civictheme_starter_kit/.storybook/importer.scss_variables.js b/docroot/themes/contrib/civictheme/civictheme_starter_kit/.storybook/importer.scss_variables.js index 6540e3dda..9df9ef9c1 100644 --- a/docroot/themes/contrib/civictheme/civictheme_starter_kit/.storybook/importer.scss_variables.js +++ b/docroot/themes/contrib/civictheme/civictheme_starter_kit/.storybook/importer.scss_variables.js @@ -3,7 +3,7 @@ // Extract CSS variables as object from SCSS file. // const fs = require('fs'); -const extractor = require('@integratedexperts/scss-variables-extractor'); +const extractor = require('@alexskrypnyk/scss-variables-extractor'); const files = [ './components_combined/00-base/_variables.base.scss', diff --git a/docroot/themes/contrib/civictheme/civictheme_starter_kit/package.json b/docroot/themes/contrib/civictheme/civictheme_starter_kit/package.json index 46e90ba40..6b89da857 100644 --- a/docroot/themes/contrib/civictheme/civictheme_starter_kit/package.json +++ b/docroot/themes/contrib/civictheme/civictheme_starter_kit/package.json @@ -24,7 +24,7 @@ "@babel/cli": "^7.15.4", "@babel/core": "^7.15.5", "@babel/preset-env": "^7.15.6", - "@integratedexperts/scss-variables-extractor": "^0.1.0", + "@alexskrypnyk/scss-variables-extractor": "^0.1.0", "@storybook/addon-a11y": "^6.1.18", "@storybook/addon-essentials": "^6.3.8", "@storybook/addon-knobs": "^6.3.1", diff --git a/docroot/themes/contrib/civictheme/package.json b/docroot/themes/contrib/civictheme/package.json index 10f83bd10..c19ab95a7 100644 --- a/docroot/themes/contrib/civictheme/package.json +++ b/docroot/themes/contrib/civictheme/package.json @@ -25,7 +25,7 @@ "@babel/cli": "^7.15.4", "@babel/core": "^7.15.5", "@babel/preset-env": "^7.15.6", - "@integratedexperts/scss-variables-extractor": "^0.1.0", + "@alexskrypnyk/scss-variables-extractor": "^0.1.0", "@storybook/addon-a11y": "^6.1.18", "@storybook/addon-essentials": "^6.3.8", "@storybook/addon-knobs": "^6.3.1", From 149f896922555bb3512c6b42e59b41a67d90ac2c Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 16 Mar 2023 20:02:18 +1100 Subject: [PATCH 6/6] [#1038] Fixed path resolution in info.js to work correctly in sub-theme. --- .docker/Dockerfile.cli.sibling | 13 +----------- .../civictheme_library/webpack/info.js | 18 +++++++++++----- scripts/drevops/lint.sh | 21 +++++++++++++------ tests/bats/assets.bats | 2 ++ tests/bats/assets_library.bats | 2 ++ 5 files changed, 33 insertions(+), 23 deletions(-) diff --git a/.docker/Dockerfile.cli.sibling b/.docker/Dockerfile.cli.sibling index 72d31f250..4bda0bd35 100644 --- a/.docker/Dockerfile.cli.sibling +++ b/.docker/Dockerfile.cli.sibling @@ -97,22 +97,11 @@ RUN COMPOSER_MEMORY_LIMIT=-1 composer install -n --no-dev --ansi --prefer-dist - COPY docroot/themes/contrib/civictheme/civictheme_library/package.json docroot/themes/contrib/civictheme/civictheme_library/package* /app/docroot/themes/contrib/civictheme/civictheme_library/ COPY docroot/themes/contrib/civictheme/ docroot/themes/contrib/civictheme/package* /app/docroot/themes/contrib/civictheme/ -# Install NodeJS dependencies. -# Since Drupal does not use NodeJS for production, it does not matter if we -# install development dependencies here - they are not exposed in any way. -RUN npm --prefix docroot/themes/contrib/civictheme/civictheme_library install --no-audit --no-progress --unsafe-perm -RUN npm --prefix docroot/themes/contrib/civictheme install --no-audit --no-progress --unsafe-perm - # Copy all files into appllication source directory. Existing files are always # overridden. COPY . /app -# Compile front-end assets. Running this after copying all files as we need -# sources to compile assets. -RUN cd /app/docroot/themes/contrib/civictheme/civictheme_library && npm run build -RUN cd /app/docroot/themes/contrib/civictheme && npm run build - -# Create another subtheme in the same directory as CivicTheme. +# Create a subtheme in the same directory as CivicTheme. RUN cd /app/docroot/themes/contrib/civictheme \ && php civictheme_create_subtheme.php civictheme_demo "CivicTheme Demo Sibling" "Demo sub-theme for a CivicTheme theme installed in the same directory." ../civictheme_demo diff --git a/docroot/themes/contrib/civictheme/civictheme_library/webpack/info.js b/docroot/themes/contrib/civictheme/civictheme_library/webpack/info.js index 76cd7fa2f..081af4a59 100644 --- a/docroot/themes/contrib/civictheme/civictheme_library/webpack/info.js +++ b/docroot/themes/contrib/civictheme/civictheme_library/webpack/info.js @@ -1,11 +1,19 @@ // phpcs:ignoreFile -const boxen = require('boxen'); -const chalk = require('chalk'); -const dedent = require('dedent'); const fs = require('fs'); const path = require('path'); -const glob = require('glob-gitignore'); -const semver = require('semver'); + +const options = { + paths: [ + 'node_modules', + ], +}; +/* eslint-disable */ +const boxen = require(require.resolve('boxen', options)); +const chalk = require(require.resolve('chalk', options)); +const dedent = require(require.resolve('dedent', options)); +const glob = require(require.resolve('glob-gitignore', options)); +const semver = require(require.resolve('semver', options)); +/* eslint-enable */ const defaultInfo = { version: '1.99.0', diff --git a/scripts/drevops/lint.sh b/scripts/drevops/lint.sh index 3ce8393a9..45cff79db 100755 --- a/scripts/drevops/lint.sh +++ b/scripts/drevops/lint.sh @@ -43,12 +43,21 @@ if [ -z "${DREVOPS_LINT_TYPE##*be*}" ]; then [ "${DREVOPS_LINT_BE_ALLOW_FAILURE}" -eq 1 ] fi -if [ -z "${DREVOPS_LINT_TYPE##*fe*}" ] && [ -n "${DREVOPS_DRUPAL_THEME}" ] && grep -q lint "docroot/themes/contrib/${DREVOPS_DRUPAL_THEME}/package.json"; then - # Lint code using front-end linter. - npm run --prefix "docroot/themes/contrib/${DREVOPS_DRUPAL_THEME}/civictheme_library" lint && \ - npm run --prefix "docroot/themes/contrib/${DREVOPS_DRUPAL_THEME}" lint || \ - # Flag to allow lint to fail. - [ "${DREVOPS_LINT_FE_ALLOW_FAILURE}" -eq 1 ] +# Lint code using front-end linter. +if [ -z "${DREVOPS_LINT_TYPE##*fe*}" ] && [ -n "${DREVOPS_DRUPAL_THEME}" ]; then + # Lint library. + if grep -q lint "docroot/themes/contrib/${DREVOPS_DRUPAL_THEME}/civictheme_library/package.json" && [ -d "docroot/themes/contrib/${DREVOPS_DRUPAL_THEME}/civictheme_library/node_modules" ]; then + npm run --prefix "docroot/themes/contrib/${DREVOPS_DRUPAL_THEME}/civictheme_library" lint || \ + # Flag to allow lint to fail. + [ "${DREVOPS_LINT_FE_ALLOW_FAILURE}" -eq 1 ] + fi + + # Lint base theme. + if grep -q lint "docroot/themes/contrib/${DREVOPS_DRUPAL_THEME}/package.json" && [ -d "docroot/themes/contrib/${DREVOPS_DRUPAL_THEME}/node_modules" ]; then + npm run --prefix "docroot/themes/contrib/${DREVOPS_DRUPAL_THEME}" lint || \ + # Flag to allow lint to fail. + [ "${DREVOPS_LINT_FE_ALLOW_FAILURE}" -eq 1 ] + fi fi # Lint theme configuration. diff --git a/tests/bats/assets.bats b/tests/bats/assets.bats index ccd8a4895..50aaabe65 100644 --- a/tests/bats/assets.bats +++ b/tests/bats/assets.bats @@ -11,6 +11,8 @@ load _helper pushd "${dir}" >/dev/null || exit 1 + [ ! -d "node_modules" ] && debug "Skipping tests" && return + [ ! -d "dist" ] && npm run build # Files managed by the developer. diff --git a/tests/bats/assets_library.bats b/tests/bats/assets_library.bats index 80c4e92a8..efda24e8c 100644 --- a/tests/bats/assets_library.bats +++ b/tests/bats/assets_library.bats @@ -11,6 +11,8 @@ load _helper pushd "${dir}" >/dev/null || exit 1 + [ ! -d "node_modules" ] && debug "Skipping tests" && return + [ ! -d "dist" ] && npm run build # Files managed by the developer.