refactor: rename third-party JS libs folder from vendor to lib

Rename static/shared/js/vendor/ to static/shared/js/lib/ to avoid
confusion with the app's "vendor" (seller) dashboard code in
static/vendor/js/.

- Rename directory: vendor/ → lib/
- Update all template references to use new path
- Update CDN fallback documentation
- Fix .gitignore to use /lib/ (root only) instead of lib/ (everywhere)

Third-party libraries:
- alpine.min.js
- chart.umd.min.js
- flatpickr.min.js
- quill.js
- tom-select.complete.min.js

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-13 20:36:53 +01:00
parent 65e5c55266
commit 7a7b612519
19 changed files with 482 additions and 60 deletions

View File

@@ -505,13 +505,13 @@ All frontends use CDN with local fallback. Check that local copies exist:
```bash
# From project root
ls -lh static/shared/css/tailwind.min.css
ls -lh static/shared/js/vendor/alpine.min.js
ls -lh static/shared/js/lib/alpine.min.js
```
**Expected output:**
```
-rw-r--r-- 1 user user 2.9M static/shared/css/tailwind.min.css
-rw-r--r-- 1 user user 44K static/shared/js/vendor/alpine.min.js
-rw-r--r-- 1 user user 44K static/shared/js/lib/alpine.min.js
```
**If files are missing:**
@@ -569,7 +569,7 @@ app.mount("/static", StaticFiles(directory="static"), name="static")
```bash
# With app running, test directly:
curl http://localhost:8000/static/shared/css/tailwind.min.css | head -n 5
curl http://localhost:8000/static/shared/js/vendor/alpine.min.js | head -n 5
curl http://localhost:8000/static/shared/js/lib/alpine.min.js | head -n 5
```
### Solution 5: File Permissions
@@ -579,7 +579,7 @@ If files exist but return 403 Forbidden:
```bash
# Fix permissions
chmod 644 static/shared/css/tailwind.min.css
chmod 644 static/shared/js/vendor/alpine.min.js
chmod 644 static/shared/js/lib/alpine.min.js
chmod 755 static/shared/css
chmod 755 static/shared/js/vendor
```