From 10eb2bda0f1069c4a6fcd3ff2c40b5fe0b902bb3 Mon Sep 17 00:00:00 2001 From: Ian Dunn Date: Tue, 21 Nov 2023 14:42:38 -0800 Subject: [PATCH] Events: Setup PostCSS --- .gitignore | 1 + package.json | 3 +- .../themes/wporg-events-2023/.stylelintrc | 18 + .../themes/wporg-events-2023/README.md | 3 + .../themes/wporg-events-2023/package.json | 19 + .../parts/front-page/cover.html | 4 +- .../wporg-events-2023/postcss.config.js | 23 + .../postcss/front-page/cover.pcss | 4 + .../{style.css => postcss/style.pcss} | 2 + yarn.lock | 18917 +++++++++------- 10 files changed, 10318 insertions(+), 8676 deletions(-) create mode 100644 public_html/wp-content/themes/wporg-events-2023/.stylelintrc create mode 100644 public_html/wp-content/themes/wporg-events-2023/README.md create mode 100644 public_html/wp-content/themes/wporg-events-2023/package.json create mode 100644 public_html/wp-content/themes/wporg-events-2023/postcss.config.js create mode 100644 public_html/wp-content/themes/wporg-events-2023/postcss/front-page/cover.pcss rename public_html/wp-content/themes/wporg-events-2023/{style.css => postcss/style.pcss} (87%) diff --git a/.gitignore b/.gitignore index 11a0722f0..21cafde89 100644 --- a/.gitignore +++ b/.gitignore @@ -111,3 +111,4 @@ public_html/wp-content/themes/twentytwentytwo public_html/wp-content/themes/twentytwentythree public_html/wp-content/themes/twentytwentyfour public_html/wp-content/themes/wporg-parent-2021 +public_html/wp-content/themes/wporg-events-2023/style.css diff --git a/package.json b/package.json index e4f9d6121..8b632104a 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "public_html/wp-content/plugins/wc-post-types", "public_html/wp-content/plugins/wcpt", "public_html/wp-content/plugins/wordcamp-forms-to-drafts", - "public_html/wp-content/plugins/wordcamp-speaker-feedback" + "public_html/wp-content/plugins/wordcamp-speaker-feedback", + "public_html/wp-content/themes/wporg-events-2023" ], "browserslist": [ "extends @wordpress/browserslist-config" diff --git a/public_html/wp-content/themes/wporg-events-2023/.stylelintrc b/public_html/wp-content/themes/wporg-events-2023/.stylelintrc new file mode 100644 index 000000000..be0631fd0 --- /dev/null +++ b/public_html/wp-content/themes/wporg-events-2023/.stylelintrc @@ -0,0 +1,18 @@ +{ + "extends": "@wordpress/stylelint-config", + "rules": { + "max-line-length": null, + "no-duplicate-selectors": null, + "no-descending-specificity": null, + "rule-empty-line-before": [ + "always-multi-line", + { + "except": [ + "first-nested", + "after-single-line-comment" + ] + } + ], + "selector-class-pattern": null + } +} \ No newline at end of file diff --git a/public_html/wp-content/themes/wporg-events-2023/README.md b/public_html/wp-content/themes/wporg-events-2023/README.md new file mode 100644 index 000000000..9b1e7b5f1 --- /dev/null +++ b/public_html/wp-content/themes/wporg-events-2023/README.md @@ -0,0 +1,3 @@ +# wporg-events-2023 + +You must run the `build` task for this to be recognized as a valid theme by WP. diff --git a/public_html/wp-content/themes/wporg-events-2023/package.json b/public_html/wp-content/themes/wporg-events-2023/package.json new file mode 100644 index 000000000..bf9b94e89 --- /dev/null +++ b/public_html/wp-content/themes/wporg-events-2023/package.json @@ -0,0 +1,19 @@ +{ + "name": "wporg-events-2023", + "version": "0.0.1", + "description": "Description: Includes templates for the homepage, event archives, etc", + "license": "GPL-2.0-or-later", + "devDependencies": { + "cssnano": "^6.0.1", + "postcss": "^8.4.31", + "postcss-cli": "^10.1.0", + "postcss-import": "^15.1.0", + "postcss-preset-env": "^9.3.0" + }, + "scripts": { + "watch": "npm run build -- --watch", + "build": "postcss postcss/style.pcss --output style.css", + "lint:js": "echo 'There is no JS, but this is required to make the `linter.yml` workflow pass. See https://github.com/yarnpkg/yarn/issues/6739, https://github.com/yarnpkg/yarn/issues/6894.'", + "lint:css": "wp-scripts lint-style 'postcss/*.pcss'" + } +} diff --git a/public_html/wp-content/themes/wporg-events-2023/parts/front-page/cover.html b/public_html/wp-content/themes/wporg-events-2023/parts/front-page/cover.html index 08cb04972..376f53151 100644 --- a/public_html/wp-content/themes/wporg-events-2023/parts/front-page/cover.html +++ b/public_html/wp-content/themes/wporg-events-2023/parts/front-page/cover.html @@ -1,5 +1,5 @@ - -
+ +