Skip to content

Commit

Permalink
Merge branch 'release/1.4.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Mar 16, 2023
2 parents 93f1904 + 149f896 commit bdba98d
Show file tree
Hide file tree
Showing 13 changed files with 68 additions and 31 deletions.
13 changes: 1 addition & 12 deletions .docker/Dockerfile.cli.sibling
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
https://salsadigital.atlassian.net/browse/CIVIC-<NUMBER>

## 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.`
Expand Down
29 changes: 29 additions & 0 deletions docroot/modules/custom/civictheme_migrate/MAPPINGS.md
Original file line number Diff line number Diff line change
@@ -0,0 +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.

Status:

- `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 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` |
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion docroot/themes/contrib/civictheme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
21 changes: 15 additions & 6 deletions scripts/drevops/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions tests/bats/assets.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions tests/bats/assets_library.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit bdba98d

Please sign in to comment.