stores & types

This commit is contained in:
matthieu42morin 2024-02-12 20:00:48 +01:00
parent 757fc55f66
commit 55d920da09
4 changed files with 46 additions and 20 deletions

View File

@ -24,23 +24,24 @@
"test-ct": "playwright test -c playwright-ct.config.ts"
},
"devDependencies": {
"@playwright/experimental-ct-svelte": "^1.39.0",
"@playwright/experimental-ct-svelte": "^1.41.2",
"@skeletonlabs/skeleton": "2.0.0",
"@skeletonlabs/tw-plugin": "0.1.0",
"@sveltejs/adapter-cloudflare": "^2.3.3",
"@sveltejs/kit": "^1.27.3",
"@sveltejs/adapter-cloudflare": "^2.3.4",
"@sveltejs/kit": "^1.30.3",
"@tailwindcss/forms": "0.5.6",
"@tailwindcss/typography": "0.5.9",
"@types/js-cookie": "^3.0.5",
"@types/js-cookie": "^3.0.6",
"@types/node": "20.5.7",
"@types/prismjs": "^1.26.2",
"@types/prismjs": "^1.26.3",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"autoprefixer": "10.4.15",
"emoji-regex": "^10.3.0",
"eslint": "^8.53.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-svelte": "^2.34.1",
"eslint-plugin-svelte": "^2.35.1",
"ficons": "^1.1.54",
"hastscript": "^8.0.0",
"js-cookie": "^3.0.5",
"mdast-util-to-string": "^4.0.0",
@ -50,33 +51,35 @@
"prettier-plugin-svelte": "^2.10.1",
"rehype-img-size": "^1.0.1",
"rehype-wrap-all": "^1.1.0",
"remark-autolink-headings": "^7.0.1",
"remark-external-links": "^9.0.1",
"remark-slug": "^7.0.1",
"sass": "^1.69.5",
"svelte": "^4.2.2",
"svelte-check": "^3.5.2",
"sass": "^1.70.0",
"svelte": "^4.2.10",
"svelte-check": "^3.6.4",
"tailwindcss": "3.3.3",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"typescript": "^5.3.3",
"unist-util-visit": "^5.0.0",
"vite": "^4.5.0",
"vite": "^4.5.2",
"vite-plugin-tailwind-purgecss": "0.1.3",
"vitest": "^0.34.6"
},
"dependencies": {
"@floating-ui/dom": "1.5.1",
"@fortawesome/fontawesome-free": "^6.4.2",
"@threlte/core": "^6.1.0",
"@threlte/extras": "^7.5.0",
"@fortawesome/fontawesome-free": "^6.5.1",
"@sveltejs/adapter-node": "^4.0.1",
"@threlte/core": "^6.1.1",
"@threlte/extras": "^8.7.4",
"@yushijinhun/three-minifier-rollup": "^0.4.0",
"ficons": "^1.1.54",
"highlight.js": "11.8.0",
"latest": "^0.2.0",
"linkedom": "^0.15.6",
"prismjs": "^1.29.0",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",
"remark-toc": "^9.0.0",
"remark-unwrap-images": "^4.0.0",
"rss": "^1.2.2",
"svelte-preprocess": "^5.0.4"
"svelte-preprocess": "^5.1.3"
},
"type": "module"
}

11
src/lib/stores/stores.ts Normal file
View File

@ -0,0 +1,11 @@
import { readable } from 'svelte/store';
export const time = readable(new Date(), function start(set) {
const interval = setInterval(() => {
set(new Date());
}, 1000);
return function stop() {
clearInterval(interval);
};
});

View File

@ -1,4 +1,4 @@
import type { MarkdownMetadata } from '../../../src/content/types';
import type { MarkdownMetadata } from '$content/types';
export type BlogTag = 'DevOps' | 'AI' | 'Updates' | '';

12
src/lib/types/projects.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
import type { MarkdownMetadata } from '$content/types';
export interface Project extends MarkdownMetadata {
title: string;
excerpt: string;
slug: string;
image: string;
date: string;
pageTitle: string;
pageDescription: string;
keywords: string;
}