From 55e330f828929e5a845f920836a5a991e7c50b64 Mon Sep 17 00:00:00 2001 From: purple Date: Thu, 28 Dec 2023 17:56:33 +0100 Subject: [PATCH] feat(react-css): Place all react-bundled css overrides in a new "blueprint" folder. --- blueprint.sh | 9 +++++---- resources/scripts/{ => blueprint}/css/extensions.css | 0 resources/scripts/blueprint/css/imported/.gitkeep | 0 resources/scripts/index.tsx | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) rename resources/scripts/{ => blueprint}/css/extensions.css (100%) create mode 100644 resources/scripts/blueprint/css/imported/.gitkeep diff --git a/blueprint.sh b/blueprint.sh index ccbd003..0e3aa4c 100644 --- a/blueprint.sh +++ b/blueprint.sh @@ -627,9 +627,9 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then VCMD="y" if [[ $dashboard_css != "" ]]; then log_bright "[INFO] Placing dashboard css.." YARN="y" - sed -i "s~@import url($identifier.css);~~g" "resources/scripts/css/extensions.css" - echo -e "@import url($identifier.css);" >> "resources/scripts/css/extensions.css" - cp ".blueprint/tmp/$n/$dashboard_css" "resources/scripts/css/$identifier.css" + sed -i "s~@import url($identifier.css);~~g" "resources/scripts/blueprint/css/extensions.css" + echo -e "@import url($identifier.css);" >> "resources/scripts/blueprint/css/extensions.css" + cp ".blueprint/tmp/$n/$dashboard_css" "resources/scripts/blueprint/css/imported/$identifier.css" fi if [[ $name == *"~"* ]]; then log_yellow "[WARNING] 'name' contains '~' and may result in an error.";fi @@ -934,7 +934,8 @@ if [[ ( $2 == "-r" ) || ( $2 == "-remove" ) ]]; then VCMD="y" # Remove dashboard css if [[ $dashboard_css != "" ]]; then log_bright "[INFO] Removing dashboard css.." - sed -i "s~@import url($identifier.css);~~g" "resources/scripts/css/extensions.css" + sed -i "s~@import url($identifier.css);~~g" "resources/scripts/blueprint/css/extensions.css" + rm "resources/scripts/blueprint/css/imported/$identifier.css" YARN="y" fi diff --git a/resources/scripts/css/extensions.css b/resources/scripts/blueprint/css/extensions.css similarity index 100% rename from resources/scripts/css/extensions.css rename to resources/scripts/blueprint/css/extensions.css diff --git a/resources/scripts/blueprint/css/imported/.gitkeep b/resources/scripts/blueprint/css/imported/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/resources/scripts/index.tsx b/resources/scripts/index.tsx index 401a0c3..7a5c46b 100644 --- a/resources/scripts/index.tsx +++ b/resources/scripts/index.tsx @@ -2,7 +2,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import App from '@/components/App'; import { setConfig } from 'react-hot-loader'; -import './css/extensions.css'; +import './blueprint/css/extensions.css'; // Enable language support. import './i18n';