create-caspian-app 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.py +21 -58
- package/dist/public/js/pp-reactive-v2.js +1 -1
- package/dist/settings/build-static.py +3 -15
- package/package.json +1 -1
|
@@ -55,10 +55,6 @@ from casp.caspian_config import get_files_index # noqa: E402
|
|
|
55
55
|
OUT_DIR = ROOT / "static"
|
|
56
56
|
PUBLIC_DIR = ROOT / "public"
|
|
57
57
|
|
|
58
|
-
# Public asset trees to mirror into static/ (source name -> output name).
|
|
59
|
-
ASSET_DIRS = ("css", "js", "assets", "uploads")
|
|
60
|
-
ASSET_FILES = ("favicon.ico",)
|
|
61
|
-
|
|
62
58
|
GREEN = "\033[32m"
|
|
63
59
|
YELLOW = "\033[33m"
|
|
64
60
|
RED = "\033[31m"
|
|
@@ -175,17 +171,9 @@ def _reset_out_dir(out_dir: Path, attempts: int = 5, delay: float = 0.4) -> bool
|
|
|
175
171
|
|
|
176
172
|
|
|
177
173
|
def _copy_assets() -> None:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
dst = OUT_DIR / name
|
|
182
|
-
shutil.copytree(src, dst, dirs_exist_ok=True)
|
|
183
|
-
print(f"{DIM} copied public/{name}/ -> static/{name}/{RESET}")
|
|
184
|
-
for name in ASSET_FILES:
|
|
185
|
-
src = PUBLIC_DIR / name
|
|
186
|
-
if src.is_file():
|
|
187
|
-
shutil.copy2(src, OUT_DIR / name)
|
|
188
|
-
print(f"{DIM} copied public/{name} -> static/{name}{RESET}")
|
|
174
|
+
if PUBLIC_DIR.is_dir():
|
|
175
|
+
shutil.copytree(PUBLIC_DIR, OUT_DIR, dirs_exist_ok=True)
|
|
176
|
+
print(f"{DIM} copied public/** -> static/{RESET}")
|
|
189
177
|
|
|
190
178
|
|
|
191
179
|
def build() -> int:
|