You've already forked Atomcms-edit
e6d92f27b3
- Rename all .js/.jsx files to .ts/.tsx across resources/js and theme dirs - Add TypeScript 6.0 with strict mode, tsconfig.json - Add type definitions for Inertia page props, Alpine.js, Turbolinks - Update vite.config.js entries to .ts/.tsx extensions - Update all Blade @vite() calls to match new .ts/.tsx entry points - Add TypeScript ESLint config (replacing unused Vue plugin) - Add @types/react, @types/react-dom, @types/lodash - Add typecheck script and integrate into check pipeline - Full tsc --noEmit, ESLint, and production build pass cleanly
37 lines
822 B
TypeScript
Executable File
37 lines
822 B
TypeScript
Executable File
import "./bootstrap";
|
|
import "./external/flowbite";
|
|
|
|
import "swiper/css";
|
|
import "swiper/css/navigation";
|
|
import "swiper/css/pagination";
|
|
|
|
import Alpine from "alpinejs";
|
|
import Focus from "@alpinejs/focus";
|
|
|
|
import ArticleReactions from "./components/ArticleReactions";
|
|
|
|
import Swiper from "swiper";
|
|
import { Navigation, Pagination } from "swiper/modules";
|
|
|
|
ArticleReactions.init();
|
|
Alpine.plugin(Focus);
|
|
Alpine.start();
|
|
|
|
Swiper.use([Navigation, Pagination]);
|
|
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
const swiperEl = document.querySelector(".swiper");
|
|
|
|
if (swiperEl) {
|
|
new Swiper(swiperEl as HTMLElement, {
|
|
navigation: {
|
|
nextEl: ".swiper-button-next",
|
|
prevEl: ".swiper-button-prev",
|
|
},
|
|
pagination: {
|
|
el: ".swiper-pagination",
|
|
},
|
|
});
|
|
}
|
|
});
|