mirror of
https://github.com/Fluffy-Bean/TastyBites.git
synced 2024-12-29 10:56:15 +00:00
Add phosphor pre-preprocessor, to improve readability of code
This commit is contained in:
parent
bfbd393b46
commit
2686fb904c
|
@ -2,11 +2,9 @@
|
||||||
import Router from 'svelte-spa-router';
|
import Router from 'svelte-spa-router';
|
||||||
import { replace, link } from 'svelte-spa-router';
|
import { replace, link } from 'svelte-spa-router';
|
||||||
import active from 'svelte-spa-router/active'
|
import active from 'svelte-spa-router/active'
|
||||||
|
import { TwitterLogo, FacebookLogo, InstagramLogo, TiktokLogo } from 'phosphor-svelte';
|
||||||
|
|
||||||
import routes from '%/routes.js';
|
import routes from '%/routes.js';
|
||||||
import TwitterLogo from 'phosphor-svelte/lib/TwitterLogo';
|
|
||||||
import FacebookLogo from 'phosphor-svelte/lib/FacebookLogo';
|
|
||||||
import InstagramLogo from 'phosphor-svelte/lib/InstagramLogo';
|
|
||||||
import TiktokLogo from 'phosphor-svelte/lib/TiktokLogo';
|
|
||||||
import Logo from '/LogoAlt.svg';
|
import Logo from '/LogoAlt.svg';
|
||||||
|
|
||||||
const links = {
|
const links = {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import CaretDown from "phosphor-svelte/lib/CaretDown";
|
import { CaretDown } from "phosphor-svelte";
|
||||||
|
|
||||||
export let open = false;
|
export let open = false;
|
||||||
export let name;
|
export let name;
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { link } from 'svelte-spa-router';
|
import { link } from 'svelte-spa-router';
|
||||||
import Acorn from 'phosphor-svelte/lib/Acorn';
|
import { Acorn, Fish, Leaf, Pepper, ArrowUpRight, GrainsSlash } from 'phosphor-svelte';
|
||||||
import Fish from 'phosphor-svelte/lib/Fish';
|
|
||||||
import Leaf from 'phosphor-svelte/lib/Leaf';
|
|
||||||
import Pepper from 'phosphor-svelte/lib/Pepper';
|
|
||||||
import ArrowUpRight from 'phosphor-svelte/lib/ArrowUpRight';
|
|
||||||
import GrainsSlash from 'phosphor-svelte/lib/GrainsSlash';
|
|
||||||
import LoadingImage from '/MenuItemLoadingAlt.svg';
|
import LoadingImage from '/MenuItemLoadingAlt.svg';
|
||||||
|
|
||||||
export let id;
|
export let id;
|
||||||
|
|
|
@ -29,7 +29,7 @@ export default Items = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "half eaten mouldy bread",
|
name: "half eaten mouldy bread",
|
||||||
price: -9999,
|
price: -99,
|
||||||
labels: ["nut"],
|
labels: ["nut"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import SmileySad from "phosphor-svelte/lib/SmileySad";
|
import { SmileySad } from "phosphor-svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import PaperPlaneRight from "phosphor-svelte/lib/PaperPlaneRight";
|
import { PaperPlaneRight } from "phosphor-svelte";
|
||||||
|
|
||||||
import DropDown from "%/components/DropDown.svelte";
|
import DropDown from "%/components/DropDown.svelte";
|
||||||
import { expandOnTyping } from "%/lib/utils.js";
|
import { expandOnTyping } from "%/lib/utils.js";
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
import { link } from 'svelte-spa-router';
|
import { link } from 'svelte-spa-router';
|
||||||
import { map, tileLayer, marker } from 'leaflet';
|
import { map, tileLayer, marker } from 'leaflet';
|
||||||
import ArrowUpRight from "phosphor-svelte/lib/ArrowUpRight";
|
import { ArrowUpRight } from "phosphor-svelte";
|
||||||
|
|
||||||
import MenuList from "%/components/MenuList.svelte";
|
import MenuList from "%/components/MenuList.svelte";
|
||||||
import { getPopularToday } from "%/lib/api.js";
|
import { getPopularToday } from "%/lib/api.js";
|
||||||
import BannerImage from '/BannerExampleImage.jpg';
|
import BannerImage from '/BannerExampleImage.jpg';
|
||||||
|
|
|
@ -32,12 +32,6 @@
|
||||||
<MenuList items={items} />
|
<MenuList items={items} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="spacer"></div>
|
|
||||||
<div class="other">
|
|
||||||
<h2>Popular</h2>
|
|
||||||
<MenuList items={items} />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "%/styles/vars";
|
@import "%/styles/vars";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import ArrowClockwise from "phosphor-svelte/lib/ArrowClockwise";
|
import { ArrowClockwise } from "phosphor-svelte";
|
||||||
|
|
||||||
import MenuList from "%/components/MenuList.svelte";
|
import MenuList from "%/components/MenuList.svelte";
|
||||||
import DropDown from "%/components/DropDown.svelte";
|
import DropDown from "%/components/DropDown.svelte";
|
||||||
import { getMenuItems } from "%/lib/api.js";
|
import { getMenuItems } from "%/lib/api.js";
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
|
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
|
||||||
|
import { phosphorSvelteOptimize } from "phosphor-svelte/preprocessor"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// Consult https://svelte.dev/docs#compile-time-svelte-preprocess
|
// Consult https://svelte.dev/docs#compile-time-svelte-preprocess
|
||||||
// for more information about preprocessors
|
// for more information about preprocessors
|
||||||
preprocess: vitePreprocess(),
|
preprocess: [
|
||||||
|
phosphorSvelteOptimize(),
|
||||||
|
vitePreprocess()
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,13 @@ import { svelte } from '@sveltejs/vite-plugin-svelte'
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
base: './',
|
||||||
plugins: [
|
plugins: [
|
||||||
svelte(),
|
svelte(),
|
||||||
],
|
],
|
||||||
base: './',
|
optimizeDeps: {
|
||||||
|
exclude: ["phosphor-svelte"],
|
||||||
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'%': __dirname + '/src',
|
'%': __dirname + '/src',
|
||||||
|
|
Loading…
Reference in a new issue