|
@@ -514,25 +514,6 @@ def compile_tailwind(
|
|
|
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():
|
|
|
"""Empty out .web/pages directory."""
|
|
|
if not is_prod_mode() and environment.REFLEX_PERSIST_WEB_DIR.get():
|