Skip to content

Commit

Permalink
Replaced the UI Kit source mechanism to be moreinline with best FE pr…
Browse files Browse the repository at this point in the history
…actices.
  • Loading branch information
AlexSkrypnyk committed Jan 9, 2024
1 parent ef4926b commit 2907c44
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 55 deletions.
3 changes: 0 additions & 3 deletions .docker/cli.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ ARG WEBROOT=web
ARG GITHUB_TOKEN=""
ENV GITHUB_TOKEN=${GITHUB_TOKEN}

ARG CIVICTHEME_UIKIT_REF=""
ENV CIVICTHEME_UIKIT_REF=${CIVICTHEME_UIKIT_REF}

# Set default values for environment variables.
# These values will be overridden if set in docker-compose.yml or .env file
# during build stage.
Expand Down
3 changes: 0 additions & 3 deletions .docker/cli.onlytheme.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ ARG WEBROOT=web
ARG GITHUB_TOKEN=""
ENV GITHUB_TOKEN=${GITHUB_TOKEN}

ARG CIVICTHEME_UIKIT_REF=""
ENV CIVICTHEME_UIKIT_REF=${CIVICTHEME_UIKIT_REF}

# Set default values for environment variables.
# These values will be overridden if set in docker-compose.yml or .env file
# during build stage.
Expand Down
3 changes: 0 additions & 3 deletions .docker/cli.sibling.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ ARG WEBROOT=web
ARG GITHUB_TOKEN=""
ENV GITHUB_TOKEN=${GITHUB_TOKEN}

ARG CIVICTHEME_UIKIT_REF=""
ENV CIVICTHEME_UIKIT_REF=${CIVICTHEME_UIKIT_REF}

# Set default values for environment variables.
# These values will be overridden if set in docker-compose.yml or .env file
# during build stage.
Expand Down
7 changes: 0 additions & 7 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,3 @@ DREVOPS_NOTIFY_EMAIL_FROM="lagoon-deploy+monorepo-drupal@salsa.digital"
# with optional names in the format "email|name".
# Example: "to1@example.com|Jane Doe, to2@example.com|John Doe"
DREVOPS_NOTIFY_EMAIL_RECIPIENTS="p.civictheme+lagoon-deploy.monorepo-drupal@salsa.digital|CivicTheme group"

################################################################################
# CUSTOM #
################################################################################

# CivicTheme UIKit version or branch to bake into the Drupal theme.
CIVICTHEME_UIKIT_REF=1.6.3
3 changes: 0 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ x-environment: &default-environment
DRUPAL_SHIELD_PASS: ${DRUPAL_SHIELD_PASS:-}
# Lagoon environment type.
LAGOON_ENVIRONMENT_TYPE: ${LAGOON_ENVIRONMENT_TYPE:-local}
# CivicTheme UIKit version or branch to bake into the Drupal theme.
CIVICTHEME_UIKIT_REF: ${CIVICTHEME_UIKIT_REF:-}

# ------------------------------------------------------------------------------
# Services.
Expand All @@ -76,7 +74,6 @@ services:
args:
WEBROOT: "${DREVOPS_WEBROOT:-web}"
GITHUB_TOKEN: "${GITHUB_TOKEN:-}"
CIVICTHEME_UIKIT_REF: "${CIVICTHEME_UIKIT_REF:-}"
image: &cli-image ${COMPOSE_PROJECT_NAME:-example_site}
<<: *default-volumes
user: root
Expand Down
7 changes: 4 additions & 3 deletions web/themes/contrib/civictheme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ Drupal 10 component-based theme.

## Introduction

CivicTheme theme, the Drupal theme built using a UI kit, provides components
and data structures to enhance editorial experiences out-of-the-box.
CivicTheme theme, the Drupal theme with the UI Kit integration, provides
components and data structures to enhance end-user and editorial experiences
out-of-the-box.

The [UI kit](https://github.com/civictheme/uikit)
is a CMS-agnostic HTML/CSS/JS framework based on Atomic Design principles.

The Drupal theme provides full integration with UI kit.
The Drupal theme provides full integration and ships with the UI Kit.

## Installation

Expand Down
46 changes: 21 additions & 25 deletions web/themes/contrib/civictheme/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions web/themes/contrib/civictheme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@
"dist": "export NODE_OPTIONS=--openssl-legacy-provider && webpack --config ./webpack/webpack.prod.js",
"dist:dev": "export NODE_OPTIONS=--openssl-legacy-provider && webpack --config ./webpack/webpack.dev.js",
"add-lint-exclusions": "php civictheme_starter_kit/scripts/add_phpcs_exclusions.php dist,storybook-static,lib/uikit/storybook-static,lib/uikit/dist",
"update-uikit": "rm -Rf lib/uikit > /dev/null 2>&1 || true && mkdir -p lib/uikit && [ \"${CIVICTHEME_UIKIT_REF}\" != \"${CIVICTHEME_UIKIT_REF#*[0-9]}\" ] && path=tags/v${CIVICTHEME_UIKIT_REF}.tar.gz || path=heads/${CIVICTHEME_UIKIT_REF:-main}.tar.gz && curl -LSs https://github.com/civictheme/uikit/archive/refs/${path} | tar -xz --strip-components=1 -C lib/uikit",
"postinstall": "npm run update-uikit"
"uikit-install": "rm -Rf lib/uikit > /dev/null 2>&1 && mkdir -p lib/uikit && cp -R node_modules/@civictheme/uikit lib",
"postinstall": "npm run uikit-install"
},
"dependencies": {
"@civictheme/uikit": "github:civictheme/uikit#v1.7.0"
},
"devDependencies": {
"@alexskrypnyk/scss-variables-extractor": "^0.1.0",
"@babel/cli": "^7.15.4",
"@babel/core": "^7.15.5",
"@babel/preset-env": "^7.15.6",
"@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 Expand Up @@ -70,10 +73,5 @@
"webpack": "^4.46.0",
"webpack-cli": "^4.8.0",
"webpack-merge": "^5.8.0"
},
"dependencies": {
"@popperjs/core": "^2.11.6",
"breakpoint-sass": "^2.7.1",
"normalize.css": "^8.0.1"
}
}
1 change: 1 addition & 0 deletions web/themes/contrib/civictheme/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ parameters:
- build
- '*/vendor/*'
- '*/node_modules/*'
- '*/lib/*'

drupal:
drupal_root: build
Expand Down

0 comments on commit 2907c44

Please sign in to comment.