Skip to content

Commit

Permalink
chore: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Leksat committed May 9, 2024
1 parent 7c69623 commit abd5a57
Show file tree
Hide file tree
Showing 15 changed files with 90 additions and 65 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ jobs:

- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
run:
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >>
$GITHUB_OUTPUT
id: extract_branch

- name: Prepare deployment package
run: pnpm turbo:prep && pnpm deploy --filter "@custom/website" ../deploy --prod
run:
pnpm turbo:prep && pnpm deploy --filter "@custom/website" ../deploy
--prod
env:
VITE_DECAP_REPO: ${{ github.repository }}
VITE_DECAP_BRANCH: ${{ steps.extract_branch.outputs.branch }}
Expand All @@ -54,16 +58,21 @@ jobs:
- name: Deploy to dev
run: pnpm netlify deploy --prod --filter "@custom/website"
working-directory: ../deploy
if: github.ref == 'refs/heads/dev' && steps.netlify-check.outputs.available == 'true' && vars.NETLIFY_DEV_ID != ''
if:
github.ref == 'refs/heads/dev' &&
steps.netlify-check.outputs.available == 'true' && vars.NETLIFY_DEV_ID
!= ''
env:
NETLIFY_SITE_ID: ${{ vars.NETLIFY_DEV_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}

- name: Deploy to prod
run: pnpm netlify deploy --prod --filter "@custom/website"
working-directory: ../deploy
if: github.ref == 'refs/heads/prod' && steps.netlify-check.outputs.available == 'true' && vars.NETLIFY_PROD_ID != ''
if:
github.ref == 'refs/heads/prod' &&
steps.netlify-check.outputs.available == 'true' &&
vars.NETLIFY_PROD_ID != ''
env:
NETLIFY_SITE_ID: ${{ vars.NETLIFY_PROD_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}

8 changes: 6 additions & 2 deletions .github/workflows/high_content_volume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ jobs:
run: pnpm --filter "@custom/website" clean

- name: 'Drupal: Create content'
run: pnpm --filter "@custom/cms" drush php:script scripts/create-lots-of-content/run.php
run:
pnpm --filter "@custom/cms" drush php:script
scripts/create-lots-of-content/run.php

- name: 'Gatsby: Full build'
run: pnpm --filter "@custom/website" build:gatsby
Expand All @@ -44,7 +46,9 @@ jobs:
run: pnpm --filter "@custom/website" build:gatsby

- name: 'Drupal: Create more content'
run: pnpm --filter "@custom/cms" drush php:script scripts/create-lots-of-content/create-100-pages.php
run:
pnpm --filter "@custom/cms" drush php:script
scripts/create-lots-of-content/create-100-pages.php

- name: 'Gatsby: Incremental build with new content'
run: pnpm --filter "@custom/website" build:gatsby
2 changes: 1 addition & 1 deletion .github/workflows/merge_dev_to_stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
with:
type: now
target_branch: stage
github_token: ${{ github.token }}
github_token: ${{ github.token }}
12 changes: 9 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ jobs:
steps:
- name: Init check
if: ${{ github.repository != 'AmazeeLabs/silverback-template'}}
run: echo 'Please run the INIT script. See the root README.md for instructions.' && false
run:
echo 'Please run the INIT script. See the root README.md for
instructions.' && false

- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -77,7 +79,9 @@ jobs:

- name: Merge release to prod (silverback-template only)
uses: devmasx/[email protected]
if: ${{ github.repository == 'AmazeeLabs/silverback-template' && github.ref == 'refs/heads/release'}}
if:
${{ github.repository == 'AmazeeLabs/silverback-template' &&
github.ref == 'refs/heads/release'}}
with:
type: now
from_branch: release
Expand All @@ -86,7 +90,9 @@ jobs:

docker_build:
name: Docker Build
if: startsWith(github.ref_name, 'test-all/') || startsWith(github.head_ref, 'test-all/')
if:
startsWith(github.ref_name, 'test-all/') || startsWith(github.head_ref,
'test-all/')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test_without_turbo_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ jobs:
steps:
- name: Init check
if: ${{ github.repository != 'AmazeeLabs/silverback-template'}}
run: echo 'Please run the INIT script. See the root README.md for instructions.' && false
run:
echo 'Please run the INIT script. See the root README.md for
instructions.' && false

- name: Checkout
uses: actions/checkout@v3
Expand Down
8 changes: 4 additions & 4 deletions apps/cms/scaffold/all.services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# To activate this feature, follow the instructions at the top of the
# 'example.settings.local.php' file, which sits next to this file.
parameters:
# Configure Cross-Site HTTP requests (CORS).
# Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
# for more information about the topic in general.
# Note: By default the configuration is disabled.
# Configure Cross-Site HTTP requests (CORS).
# Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
# for more information about the topic in general.
# Note: By default the configuration is disabled.
cors.config:
enabled: true
# Specify allowed headers, like 'x-allowed-header'.
Expand Down
7 changes: 5 additions & 2 deletions apps/website/netlify/functions/github-proxy.mts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ export default function (request: Request, context: Context) {
if (!process.env.DECAP_GITHUB_TOKEN) {
throw new Error('Missing environment variable DECAP_GITHUB_TOKEN.');
}
return githubProxy(request, process.env.DECAP_GITHUB_TOKEN, '/.netlify/functions/github-proxy');
return githubProxy(
request,
process.env.DECAP_GITHUB_TOKEN,
'/.netlify/functions/github-proxy',
);
}

11 changes: 4 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
version: '2.3'

x-volumes:
&default-volumes
# Define all volumes you would like to have real-time mounted into the docker containers
&default-volumes # Define all volumes you would like to have real-time mounted into the docker containers
volumes:
- ./packages/drupal:/app/web/modules/custom:delegated
- ./apps/cms:/app:delegated

x-environment:
&default-environment
x-environment: &default-environment
LAGOON_PROJECT: &lagoon-project ${COMPOSE_PROJECT_NAME:-slbtemplate}
# Route that should be used locally, if you are using pygmy, this route *must* end with .docker.amazee.io
LAGOON_ROUTE: &default-url http://${COMPOSE_PROJECT_NAME:-slbtemplate}.docker.amazee.io
Expand All @@ -17,8 +15,7 @@ x-environment:
# See example.docker-compose.override.yml for XDEBUG_ENABLE option

x-user:
&default-user
# The default user under which the containers should run. Change this if you are on linux and run with another user than id `1000`
&default-user # The default user under which the containers should run. Change this if you are on linux and run with another user than id `1000`
user: '1000'

services:
Expand Down Expand Up @@ -58,7 +55,7 @@ services:
depends_on:
- cli # basically just tells docker-compose to build the cli first
environment:
<< : *default-environment # loads the defined environment variables from the top
<<: *default-environment # loads the defined environment variables from the top
networks:
- amazeeio-network
- default
Expand Down
6 changes: 3 additions & 3 deletions packages/drupal/gutenberg_blocks/css/edit.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* We can put any editor specific styling in here */
.gutenberg__editor .editor-styles-wrapper {
font-family:inherit;
font-family: inherit;
}

.gutenberg__editor blockquote {
margin:0;
margin: 0;
}

.gutenberg__editor blockquote .quote-image img {
Expand Down Expand Up @@ -40,4 +40,4 @@
left: 0;
transform-origin: 0 0;
transform: rotate(90deg);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ theme-support:
typography:
dropCap: false
libraries-edit:
- gutenberg_blocks/edit
- gutenberg_blocks/edit
2 changes: 1 addition & 1 deletion packages/drupal/gutenberg_blocks/gutenberg_blocks.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ package: Custom
core_version_requirement: ^9 || ^10
dependencies:
- gutenberg:gutenberg
- silverback_gutenberg:silverback_gutenberg
- silverback_gutenberg:silverback_gutenberg
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ customisations:
/gutenberg.css: { preprocess: false }
dependencies:
- core/drupalSettings

5 changes: 3 additions & 2 deletions packages/ui/src/components/Atoms/Container.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@
}

.nested-container .container-page:first-child .container-text,
.nested-container .container-page:first-child .container-text *:first-child{
.nested-container .container-page:first-child .container-text *:first-child {
@apply mt-0;
}
.nested-container .container-page:last-child .container-text,
.nested-container .container-page:last-child .container-text *:last-child {
@apply mb-0;
}

.container-nested .prose ul:not(ul ul), .container-nested .prose ol:not(ol ol) {
.container-nested .prose ul:not(ul ul),
.container-nested .prose ol:not(ol ol) {
@apply mt-0;
}
60 changes: 32 additions & 28 deletions packages/ui/src/iframe.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ h1 {
@apply sr-only;
}

.visually-hidden.focusable:active, .visually-hidden.focusable:focus {
.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
@apply not-sr-only ml-1;
}

Expand All @@ -35,7 +36,6 @@ h1 {
@apply mb-4 md:mb-6;
}


.fieldset-wrapper > *:not(:last-child) {
@apply mb-5;
}
Expand All @@ -49,11 +49,13 @@ h1 {
@apply block mb-2 text-sm;
}

.form-item input[type="checkbox"] + label, .form-item input[type="radio"] + label {
.form-item input[type='checkbox'] + label,
.form-item input[type='radio'] + label {
@apply inline;
}

.form-item input[type="checkbox"], .form-item input[type="radio"] {
.form-item input[type='checkbox'],
.form-item input[type='radio'] {
@apply mr-1;
}

Expand All @@ -66,65 +68,66 @@ h1 {
@apply mt-2;
}

.form-item input[type="checkbox"] + label + .description,
.form-item input[type="radio"] + label + .description {
.form-item input[type='checkbox'] + label + .description,
.form-item input[type='radio'] + label + .description {
@apply mt-0;
}


/* field */
.form-item input[type="email"],
.form-item input[type="password"],
.form-item input[type="date"],
.form-item input[type="text"],
.form-item input[type="number"],
.form-item input[type="datetime-local"],
.form-item input[type="time"],
.form-item input[type="url"],
.form-item input[type="tel"],
.form-item input[type="search"],
.form-item input[type="color"],
.form-item input[type='email'],
.form-item input[type='password'],
.form-item input[type='date'],
.form-item input[type='text'],
.form-item input[type='number'],
.form-item input[type='datetime-local'],
.form-item input[type='time'],
.form-item input[type='url'],
.form-item input[type='tel'],
.form-item input[type='search'],
.form-item input[type='color'],
.form-item textarea,
.form-item select {
@apply bg-gray-50 border border-gray-300 text-base rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5;
}

/* checkbox */
.form-item input[type="checkbox"] {
.form-item input[type='checkbox'] {
@apply rounded -mt-1;
}

.form-item input[type="checkbox"]:not(:checked), .form-item input[type="radio"]:not(:checked) {
.form-item input[type='checkbox']:not(:checked),
.form-item input[type='radio']:not(:checked) {
@apply bg-gray-50 border-gray-300;
}

.form-item input[type="file"] {
.form-item input[type='file'] {
@apply block cursor-pointer bg-gray-50 border border-gray-300 rounded-lg block text-sm w-full;
}

.form-item input[type="file"]::file-selector-button {
.form-item input[type='file']::file-selector-button {
@apply text-white bg-blue-700 hover:bg-blue-800 rounded-l-lg text-sm w-full sm:w-auto px-6 py-2.5 text-center shadow-none border-0 font-medium mr-4;
}


.form-actions input[type="submit"] {
.form-actions input[type='submit'] {
@apply text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center;
}

.form-item input.error, .form-item textarea.error, .form-item select.error, .form-item input[type="checkbox"].error {
.form-item input.error,
.form-item textarea.error,
.form-item select.error,
.form-item input[type='checkbox'].error {
@apply border-red-500;
}

.form-required:after {
@apply content-['*'] text-gray-900 pl-1;
}


.fieldset-legend {
@apply font-bold mb-2 block;
}

[data-drupal-messages] [role="alert"] {
[data-drupal-messages] [role='alert'] {
@apply text-red-500;
}

Expand Down Expand Up @@ -162,7 +165,8 @@ h1 {
@apply right-5;
}

.ui-dialog .ui-button .ui-icon-closethick, .ui-dialog .ui-button:hover .ui-icon-closethick {
.ui-dialog .ui-button .ui-icon-closethick,
.ui-dialog .ui-button:hover .ui-icon-closethick {
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 53.7 53.7'><path fill='%23999E6E' d='M35.6 34.4L28 26.8l7.6-7.6c.2-.2.2-.5 0-.7l-.5-.5c-.2-.2-.5-.2-.7 0l-7.6 7.6-7.5-7.6c-.2-.2-.5-.2-.7 0l-.6.6c-.2.2-.2.5 0 .7l7.6 7.6-7.6 7.5c-.2.2-.2.5 0 .7l.5.5c.2.2.5.2.7 0l7.6-7.6 7.6 7.6c.2.2.5.2.7 0l.5-.5c.2-.2.2-.5 0-.7z'/></svg>");
@apply bg-no-repeat bg-center h-10 w-10 -left-0.5 -top-0.5 rounded-lg;
}
Expand Down
8 changes: 4 additions & 4 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
packages:
- "apps/*"
- "packages/*"
- "packages/drupal/*"
- "tests/*"
- 'apps/*'
- 'packages/*'
- 'packages/drupal/*'
- 'tests/*'

0 comments on commit abd5a57

Please sign in to comment.