From a3ced2e8df1cff005f0bf77ec4ce0603b14ee1b4 Mon Sep 17 00:00:00 2001
From: TomNUSDS <74203452+TomNUSDS@users.noreply.github.com>
Date: Tue, 30 Apr 2024 12:55:08 -0700
Subject: [PATCH] Fix the mess that is css
- Move scss source out of /assets/stylesheets/ and into the root /stylesheets
- Move the application.css (which is currently a static asset) into /assets/css
- Update build steps to READ from /stylesheets and output into /assets/css
- Update _head.html to use the /assets/css output location.
- Remove the SASS from _config.yml to test
---
_config.yml | 8 ++++----
_includes/_head.html | 2 +-
assets/{stylesheets => css}/application.css | 0
package.json | 6 +++---
.../application/_variables.scss | 0
.../application/base/_base.scss | 0
.../application/base/_helpers.scss | 0
.../application/components/_apply.scss | 0
.../application/components/_articles.scss | 0
.../application/components/_billboard.scss | 0
.../application/components/_blogs.scss | 0
.../application/components/_cards.scss | 0
.../application/components/_env-indicator.scss | 0
.../application/components/_footer.scss | 0
.../application/components/_instagallery.scss | 0
.../application/components/_lists.scss | 0
.../application/components/_nav.scss | 0
.../application/components/_page-banner.scss | 0
.../application/components/_site-sections.scss | 0
.../application/components/_social-buttons.scss | 0
.../application/components/_typography.scss | 0
.../application/components/_where-we-worked.scss | 0
.../application/components/_who-we-help.scss | 0
.../application/grid/_grid.scss | 0
.../application/utilities-add-ons/_display.scss | 0
.../application/utilities-add-ons/_flex.scss | 0
.../application/utilities-add-ons/_position.scss | 0
{assets/stylesheets => stylesheets}/styles.scss | 0
{assets/stylesheets => stylesheets}/uswds/_custom.scss | 0
{assets/stylesheets => stylesheets}/uswds/_index.scss | 0
{assets/stylesheets => stylesheets}/uswds/_styles.scss | 0
.../uswds/_uswds-settings.scss | 0
32 files changed, 8 insertions(+), 8 deletions(-)
rename assets/{stylesheets => css}/application.css (100%)
rename {assets/stylesheets => stylesheets}/application/_variables.scss (100%)
rename {assets/stylesheets => stylesheets}/application/base/_base.scss (100%)
rename {assets/stylesheets => stylesheets}/application/base/_helpers.scss (100%)
rename {assets/stylesheets => stylesheets}/application/components/_apply.scss (100%)
rename {assets/stylesheets => stylesheets}/application/components/_articles.scss (100%)
rename {assets/stylesheets => stylesheets}/application/components/_billboard.scss (100%)
rename {assets/stylesheets => stylesheets}/application/components/_blogs.scss (100%)
rename {assets/stylesheets => stylesheets}/application/components/_cards.scss (100%)
rename {assets/stylesheets => stylesheets}/application/components/_env-indicator.scss (100%)
rename {assets/stylesheets => stylesheets}/application/components/_footer.scss (100%)
rename {assets/stylesheets => stylesheets}/application/components/_instagallery.scss (100%)
rename {assets/stylesheets => stylesheets}/application/components/_lists.scss (100%)
rename {assets/stylesheets => stylesheets}/application/components/_nav.scss (100%)
rename {assets/stylesheets => stylesheets}/application/components/_page-banner.scss (100%)
rename {assets/stylesheets => stylesheets}/application/components/_site-sections.scss (100%)
rename {assets/stylesheets => stylesheets}/application/components/_social-buttons.scss (100%)
rename {assets/stylesheets => stylesheets}/application/components/_typography.scss (100%)
rename {assets/stylesheets => stylesheets}/application/components/_where-we-worked.scss (100%)
rename {assets/stylesheets => stylesheets}/application/components/_who-we-help.scss (100%)
rename {assets/stylesheets => stylesheets}/application/grid/_grid.scss (100%)
rename {assets/stylesheets => stylesheets}/application/utilities-add-ons/_display.scss (100%)
rename {assets/stylesheets => stylesheets}/application/utilities-add-ons/_flex.scss (100%)
rename {assets/stylesheets => stylesheets}/application/utilities-add-ons/_position.scss (100%)
rename {assets/stylesheets => stylesheets}/styles.scss (100%)
rename {assets/stylesheets => stylesheets}/uswds/_custom.scss (100%)
rename {assets/stylesheets => stylesheets}/uswds/_index.scss (100%)
rename {assets/stylesheets => stylesheets}/uswds/_styles.scss (100%)
rename {assets/stylesheets => stylesheets}/uswds/_uswds-settings.scss (100%)
diff --git a/_config.yml b/_config.yml
index 5f1bf863..5231a40c 100644
--- a/_config.yml
+++ b/_config.yml
@@ -56,10 +56,10 @@ markdown: kramdown
data_dir: _content
# Assets settings - see scripts in package.json for SASS settings.
-sass:
- sass_dir: assets/stylesheets/
- style: compressed
- sourcemap: never
+#sass:
+# sass_dir: stylesheets/
+# style: compressed
+# sourcemap: never
# Plugins
plugins:
diff --git a/_includes/_head.html b/_includes/_head.html
index db168858..79a35cca 100644
--- a/_includes/_head.html
+++ b/_includes/_head.html
@@ -92,7 +92,7 @@
-
+
{{ include.append }}
diff --git a/assets/stylesheets/application.css b/assets/css/application.css
similarity index 100%
rename from assets/stylesheets/application.css
rename to assets/css/application.css
diff --git a/package.json b/package.json
index 9203efda..f56cfed1 100644
--- a/package.json
+++ b/package.json
@@ -10,9 +10,9 @@
"build": "npm run css && cross-env JEKYLL_ENV=production LC_CTYPE=UTF-8 bundle exec jekyll build",
"build-staging": "npm run css && cross-env JEKYLL_ENV=staging LC_CTYPE=UTF-8 bundle exec jekyll build",
"css": "npm run css:sass && npm run css:autoprefixer",
- "css:sass": "sass assets/stylesheets/styles.scss _site/assets/stylesheets/styles.css --update --style=compressed --no-source-map --load-path='node_modules/@uswds/uswds/packages'",
- "css:sass:watch": "sass assets/stylesheets/styles.scss _site/assets/stylesheets/styles.css --watch --style=compressed --no-source-map --load-path='node_modules/@uswds/uswds/packages'",
- "css:autoprefixer": "npx postcss _site/assets/stylesheets/styles.css --map=false --use autoprefixer -d _site/assets/stylesheets",
+ "css:sass": "sass stylesheets/styles.scss _site/assets/css/styles.css --update --style=compressed --no-source-map --load-path='node_modules/@uswds/uswds/packages'",
+ "css:sass:watch": "sass stylesheets/styles.scss _site/assets/css/styles.css --watch --style=compressed --no-source-map --load-path='node_modules/@uswds/uswds/packages'",
+ "css:autoprefixer": "npx postcss _site/assets/css/styles.css --map=false --use autoprefixer -d _site/assets/stylesheets",
"serve": "npm run css:sass:watch & cross-env LC_CTYPE=UTF-8 bundle exec jekyll serve --livereload",
"serve-all-hosts": "npm run css & cross-env LC_CTYPE=UTF-8 bundle exec jekyll serve --host 0.0.0.0 --livereload",
"start": "npm run serve",
diff --git a/assets/stylesheets/application/_variables.scss b/stylesheets/application/_variables.scss
similarity index 100%
rename from assets/stylesheets/application/_variables.scss
rename to stylesheets/application/_variables.scss
diff --git a/assets/stylesheets/application/base/_base.scss b/stylesheets/application/base/_base.scss
similarity index 100%
rename from assets/stylesheets/application/base/_base.scss
rename to stylesheets/application/base/_base.scss
diff --git a/assets/stylesheets/application/base/_helpers.scss b/stylesheets/application/base/_helpers.scss
similarity index 100%
rename from assets/stylesheets/application/base/_helpers.scss
rename to stylesheets/application/base/_helpers.scss
diff --git a/assets/stylesheets/application/components/_apply.scss b/stylesheets/application/components/_apply.scss
similarity index 100%
rename from assets/stylesheets/application/components/_apply.scss
rename to stylesheets/application/components/_apply.scss
diff --git a/assets/stylesheets/application/components/_articles.scss b/stylesheets/application/components/_articles.scss
similarity index 100%
rename from assets/stylesheets/application/components/_articles.scss
rename to stylesheets/application/components/_articles.scss
diff --git a/assets/stylesheets/application/components/_billboard.scss b/stylesheets/application/components/_billboard.scss
similarity index 100%
rename from assets/stylesheets/application/components/_billboard.scss
rename to stylesheets/application/components/_billboard.scss
diff --git a/assets/stylesheets/application/components/_blogs.scss b/stylesheets/application/components/_blogs.scss
similarity index 100%
rename from assets/stylesheets/application/components/_blogs.scss
rename to stylesheets/application/components/_blogs.scss
diff --git a/assets/stylesheets/application/components/_cards.scss b/stylesheets/application/components/_cards.scss
similarity index 100%
rename from assets/stylesheets/application/components/_cards.scss
rename to stylesheets/application/components/_cards.scss
diff --git a/assets/stylesheets/application/components/_env-indicator.scss b/stylesheets/application/components/_env-indicator.scss
similarity index 100%
rename from assets/stylesheets/application/components/_env-indicator.scss
rename to stylesheets/application/components/_env-indicator.scss
diff --git a/assets/stylesheets/application/components/_footer.scss b/stylesheets/application/components/_footer.scss
similarity index 100%
rename from assets/stylesheets/application/components/_footer.scss
rename to stylesheets/application/components/_footer.scss
diff --git a/assets/stylesheets/application/components/_instagallery.scss b/stylesheets/application/components/_instagallery.scss
similarity index 100%
rename from assets/stylesheets/application/components/_instagallery.scss
rename to stylesheets/application/components/_instagallery.scss
diff --git a/assets/stylesheets/application/components/_lists.scss b/stylesheets/application/components/_lists.scss
similarity index 100%
rename from assets/stylesheets/application/components/_lists.scss
rename to stylesheets/application/components/_lists.scss
diff --git a/assets/stylesheets/application/components/_nav.scss b/stylesheets/application/components/_nav.scss
similarity index 100%
rename from assets/stylesheets/application/components/_nav.scss
rename to stylesheets/application/components/_nav.scss
diff --git a/assets/stylesheets/application/components/_page-banner.scss b/stylesheets/application/components/_page-banner.scss
similarity index 100%
rename from assets/stylesheets/application/components/_page-banner.scss
rename to stylesheets/application/components/_page-banner.scss
diff --git a/assets/stylesheets/application/components/_site-sections.scss b/stylesheets/application/components/_site-sections.scss
similarity index 100%
rename from assets/stylesheets/application/components/_site-sections.scss
rename to stylesheets/application/components/_site-sections.scss
diff --git a/assets/stylesheets/application/components/_social-buttons.scss b/stylesheets/application/components/_social-buttons.scss
similarity index 100%
rename from assets/stylesheets/application/components/_social-buttons.scss
rename to stylesheets/application/components/_social-buttons.scss
diff --git a/assets/stylesheets/application/components/_typography.scss b/stylesheets/application/components/_typography.scss
similarity index 100%
rename from assets/stylesheets/application/components/_typography.scss
rename to stylesheets/application/components/_typography.scss
diff --git a/assets/stylesheets/application/components/_where-we-worked.scss b/stylesheets/application/components/_where-we-worked.scss
similarity index 100%
rename from assets/stylesheets/application/components/_where-we-worked.scss
rename to stylesheets/application/components/_where-we-worked.scss
diff --git a/assets/stylesheets/application/components/_who-we-help.scss b/stylesheets/application/components/_who-we-help.scss
similarity index 100%
rename from assets/stylesheets/application/components/_who-we-help.scss
rename to stylesheets/application/components/_who-we-help.scss
diff --git a/assets/stylesheets/application/grid/_grid.scss b/stylesheets/application/grid/_grid.scss
similarity index 100%
rename from assets/stylesheets/application/grid/_grid.scss
rename to stylesheets/application/grid/_grid.scss
diff --git a/assets/stylesheets/application/utilities-add-ons/_display.scss b/stylesheets/application/utilities-add-ons/_display.scss
similarity index 100%
rename from assets/stylesheets/application/utilities-add-ons/_display.scss
rename to stylesheets/application/utilities-add-ons/_display.scss
diff --git a/assets/stylesheets/application/utilities-add-ons/_flex.scss b/stylesheets/application/utilities-add-ons/_flex.scss
similarity index 100%
rename from assets/stylesheets/application/utilities-add-ons/_flex.scss
rename to stylesheets/application/utilities-add-ons/_flex.scss
diff --git a/assets/stylesheets/application/utilities-add-ons/_position.scss b/stylesheets/application/utilities-add-ons/_position.scss
similarity index 100%
rename from assets/stylesheets/application/utilities-add-ons/_position.scss
rename to stylesheets/application/utilities-add-ons/_position.scss
diff --git a/assets/stylesheets/styles.scss b/stylesheets/styles.scss
similarity index 100%
rename from assets/stylesheets/styles.scss
rename to stylesheets/styles.scss
diff --git a/assets/stylesheets/uswds/_custom.scss b/stylesheets/uswds/_custom.scss
similarity index 100%
rename from assets/stylesheets/uswds/_custom.scss
rename to stylesheets/uswds/_custom.scss
diff --git a/assets/stylesheets/uswds/_index.scss b/stylesheets/uswds/_index.scss
similarity index 100%
rename from assets/stylesheets/uswds/_index.scss
rename to stylesheets/uswds/_index.scss
diff --git a/assets/stylesheets/uswds/_styles.scss b/stylesheets/uswds/_styles.scss
similarity index 100%
rename from assets/stylesheets/uswds/_styles.scss
rename to stylesheets/uswds/_styles.scss
diff --git a/assets/stylesheets/uswds/_uswds-settings.scss b/stylesheets/uswds/_uswds-settings.scss
similarity index 100%
rename from assets/stylesheets/uswds/_uswds-settings.scss
rename to stylesheets/uswds/_uswds-settings.scss