Skip to content

t44v1/Svelte-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Template Setup

  • npm i
  • npm run dev

Project

  • npm i @supabase/supabase-js sass --save-dev
  • Required for sass to work! (svelte.config.js)
    • import { vitePreprocess } from '@sveltejs/ vite-plugin-svelte';
    • const config = { preprocess: vitePreprocess() }

file structure

src/
  hooks.server.js         // User auth
  lib/
    config/
      languages/           // Language packs
      pages.js             // Each page Seo & its optional data
      site.svelte          // I18n & Seo implementation
    layout/                // Layout components (all optional)
    store/                 // Data groups and storage
    style/                 // Style files
    i18n.svelte            // Display translations & vars
  routes/
    (public)/
      layout.server.js     // User auth data & check
      layout.svelte        // Layout of public pages
      +page.svelte
    (private)/
      layout.server.js     // User auth data
      layout.svelte        // Layout of private pages