Compare commits
4 Commits
main
...
upgrade-to
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1e42ee0663 | ||
![]() |
620c2b3379 | ||
![]() |
6d4b4bc17c | ||
![]() |
ef0bbfb2d9 |
@ -1,7 +1,5 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: {
|
plugins: {
|
||||||
"postcss-import": {},
|
"@tailwindcss/postcss": {},
|
||||||
tailwindcss: {},
|
|
||||||
autoprefixer: {},
|
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
@import "tailwindcss/base";
|
@import "tailwindcss";
|
||||||
|
|
||||||
@import "@radix-ui/themes/styles.css";
|
@config '../tailwind.config.js';
|
||||||
|
|
||||||
@tailwind components;
|
@import "@radix-ui/themes/styles.css";
|
||||||
@tailwind utilities;
|
|
@ -1134,8 +1134,6 @@ class App(MiddlewareMixin, LifespanMixin):
|
|||||||
"content", constants.Tailwind.CONTENT
|
"content", constants.Tailwind.CONTENT
|
||||||
)
|
)
|
||||||
_submit_work(compiler.compile_tailwind, config.tailwind)
|
_submit_work(compiler.compile_tailwind, config.tailwind)
|
||||||
else:
|
|
||||||
_submit_work(compiler.remove_tailwind_from_postcss)
|
|
||||||
|
|
||||||
# Wait for all compilation tasks to complete.
|
# Wait for all compilation tasks to complete.
|
||||||
for future in concurrent.futures.as_completed(result_futures):
|
for future in concurrent.futures.as_completed(result_futures):
|
||||||
|
@ -514,25 +514,6 @@ def compile_tailwind(
|
|||||||
return output_path, code
|
return output_path, code
|
||||||
|
|
||||||
|
|
||||||
def remove_tailwind_from_postcss() -> tuple[str, str]:
|
|
||||||
"""If tailwind is not to be used, remove it from postcss.config.js.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
The path and code of the compiled postcss.config.js.
|
|
||||||
"""
|
|
||||||
# Get the path for the output file.
|
|
||||||
output_path = str(get_web_dir() / constants.Dirs.POSTCSS_JS)
|
|
||||||
|
|
||||||
code = [
|
|
||||||
line
|
|
||||||
for line in Path(output_path).read_text().splitlines(keepends=True)
|
|
||||||
if "tailwindcss: " not in line
|
|
||||||
]
|
|
||||||
|
|
||||||
# Compile the config.
|
|
||||||
return output_path, "".join(code)
|
|
||||||
|
|
||||||
|
|
||||||
def purge_web_pages_dir():
|
def purge_web_pages_dir():
|
||||||
"""Empty out .web/pages directory."""
|
"""Empty out .web/pages directory."""
|
||||||
if not is_prod_mode() and environment.REFLEX_PERSIST_WEB_DIR.get():
|
if not is_prod_mode() and environment.REFLEX_PERSIST_WEB_DIR.get():
|
||||||
|
@ -192,7 +192,6 @@ class PackageJson(SimpleNamespace):
|
|||||||
"universal-cookie": "7.2.2",
|
"universal-cookie": "7.2.2",
|
||||||
}
|
}
|
||||||
DEV_DEPENDENCIES = {
|
DEV_DEPENDENCIES = {
|
||||||
"autoprefixer": "10.4.20",
|
"@tailwindcss/postcss": "4.0.4",
|
||||||
"postcss": "8.5.1",
|
"postcss": "8.5.1",
|
||||||
"postcss-import": "16.1.0",
|
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ class Tailwind(SimpleNamespace):
|
|||||||
"""Tailwind constants."""
|
"""Tailwind constants."""
|
||||||
|
|
||||||
# The Tailwindcss version
|
# The Tailwindcss version
|
||||||
VERSION = "tailwindcss@3.4.17"
|
VERSION = "tailwindcss@4.0.4"
|
||||||
# The Tailwind config.
|
# The Tailwind config.
|
||||||
CONFIG = "tailwind.config.js"
|
CONFIG = "tailwind.config.js"
|
||||||
# Default Tailwind content paths
|
# Default Tailwind content paths
|
||||||
|
@ -10,7 +10,7 @@ from reflex.testing import AppHarness
|
|||||||
|
|
||||||
PARAGRAPH_TEXT = "Tailwind Is Cool"
|
PARAGRAPH_TEXT = "Tailwind Is Cool"
|
||||||
PARAGRAPH_CLASS_NAME = "text-red-500"
|
PARAGRAPH_CLASS_NAME = "text-red-500"
|
||||||
TEXT_RED_500_COLOR = ["rgba(239, 68, 68, 1)", "rgb(239, 68, 68)"]
|
TEXT_RED_500_COLOR = ["oklch(0.637 0.237 25.331)"]
|
||||||
|
|
||||||
|
|
||||||
def TailwindApp(
|
def TailwindApp(
|
||||||
|
Loading…
Reference in New Issue
Block a user