configs
This commit is contained in:
parent
8265e41250
commit
1156a503fa
|
@ -0,0 +1,27 @@
|
|||
name: Playwright Tests
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master ]
|
||||
pull_request:
|
||||
branches: [ main, master ]
|
||||
jobs:
|
||||
test:
|
||||
timeout-minutes: 60
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Install dependencies
|
||||
run: npm install -g pnpm && pnpm install
|
||||
- name: Install Playwright Browsers
|
||||
run: pnpm exec playwright install --with-deps
|
||||
- name: Run Playwright tests
|
||||
run: pnpm exec playwright test
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: playwright-report
|
||||
path: playwright-report/
|
||||
retention-days: 30
|
|
@ -1,19 +1,41 @@
|
|||
+ .turbo
|
||||
+ build/**
|
||||
+ dist/**
|
||||
dist
|
||||
dist-ssr
|
||||
|
||||
.DS_Store
|
||||
node_modules
|
||||
/build
|
||||
/.svelte-kit
|
||||
/package
|
||||
/lambda/
|
||||
|
||||
# Sentry Config File
|
||||
.sentryclirc
|
||||
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
*.local
|
||||
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||
.vercel
|
||||
.output
|
||||
.netlify
|
||||
|
||||
cypress/screenshots
|
||||
cypress/videos
|
||||
|
||||
.idea
|
||||
.stars-cache
|
||||
|
||||
# pm
|
||||
.yarn
|
||||
yarn-error.log
|
||||
yarn.lock
|
||||
pnpm-lock.yaml
|
||||
|
||||
# Logs
|
||||
logs
|
||||
|
@ -24,14 +46,10 @@ yarn-error.log*
|
|||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
!.vscode/extensions.json
|
||||
.vscode/*
|
||||
.editorconfig
|
||||
.idea
|
||||
*.suo
|
||||
*.ntvs*
|
||||
|
@ -61,3 +79,8 @@ public/api/vendor
|
|||
/playwright-report/
|
||||
/blob-report/
|
||||
/playwright/.cache/
|
||||
/test-results/
|
||||
/playwright-report/
|
||||
/blob-report/
|
||||
/playwright/.cache/
|
||||
|
||||
|
|
|
@ -36,3 +36,7 @@ npm run build
|
|||
You can preview the production build with `npm run preview`.
|
||||
|
||||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
|
||||
|
||||
|
||||
|
||||
TODO: REcompose based on KkosmetickySalon project
|
||||
|
|
38
package.json
38
package.json
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
"name": "portfolio",
|
||||
"name": "its-personal~portfolio",
|
||||
"description": "Uses pnpm, svelte, mdsvex",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"private": true,
|
||||
"homepage": "mattmor.in",
|
||||
"author": "Matthieu Morin",
|
||||
"license": "AGPLv3",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/matthieu42morin/Portfolio/"
|
||||
"url": "https://git.mattmor.in/Madmin/its-personal/"
|
||||
},
|
||||
"packageManager": "pnpm@8.6.6",
|
||||
"scripts": {
|
||||
|
@ -24,11 +24,10 @@
|
|||
"test-ct": "playwright test -c playwright-ct.config.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/experimental-ct-svelte": "^1.41.2",
|
||||
"@playwright/test": "^1.41.2",
|
||||
"@skeletonlabs/skeleton": "2.0.0",
|
||||
"@skeletonlabs/tw-plugin": "0.1.0",
|
||||
"@sveltejs/adapter-cloudflare": "^2.3.4",
|
||||
"@sveltejs/kit": "^1.30.3",
|
||||
"@sveltejs/kit": "^2.5.0",
|
||||
"@tailwindcss/forms": "0.5.6",
|
||||
"@tailwindcss/typography": "0.5.9",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
|
@ -41,43 +40,42 @@
|
|||
"eslint": "^8.56.0",
|
||||
"eslint-config-prettier": "^8.10.0",
|
||||
"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",
|
||||
"mdsvex": "^0.11.0",
|
||||
"postcss": "8.4.29",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier-plugin-svelte": "^2.10.1",
|
||||
"rehype-autolink-headings": "^7.1.0",
|
||||
"rehype-img-size": "^1.0.1",
|
||||
"rehype-wrap-all": "^1.1.0",
|
||||
"rehype-slug": "^6.0.0",
|
||||
"remark-external-links": "^9.0.1",
|
||||
"sass": "^1.70.0",
|
||||
"svelte": "^4.2.10",
|
||||
"remark-toc": "^9.0.0",
|
||||
"remark-unwrap-images": "^4.0.0",
|
||||
"sass": "^1.71.0",
|
||||
"shiki": "^1.1.6",
|
||||
"svelte": "^4.2.11",
|
||||
"svelte-check": "^3.6.4",
|
||||
"tailwindcss": "3.3.3",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.3.3",
|
||||
"unist-util-visit": "^5.0.0",
|
||||
"vite": "^4.5.2",
|
||||
"vite-plugin-tailwind-purgecss": "0.1.3",
|
||||
"vite": "^5.1.3",
|
||||
"vite-plugin-tailwind-purgecss": "0.2.0",
|
||||
"vitest": "^0.34.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"@floating-ui/dom": "1.5.1",
|
||||
"@fortawesome/fontawesome-free": "^6.5.1",
|
||||
"@sentry/sveltekit": "^7.102.0",
|
||||
"@sveltejs/adapter-node": "^4.0.1",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.2",
|
||||
"@threlte/core": "^6.1.1",
|
||||
"@threlte/extras": "^8.7.4",
|
||||
"@threlte/extras": "^8.7.5",
|
||||
"@yushijinhun/three-minifier-rollup": "^0.4.0",
|
||||
"highlight.js": "11.8.0",
|
||||
"latest": "^0.2.0",
|
||||
"linkedom": "^0.15.6",
|
||||
"mdsvex": "^0.11.0",
|
||||
"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.1.3"
|
||||
},
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
import adapter from '@sveltejs/adapter-cloudflare';
|
||||
import { vitePreprocess } from '@sveltejs/kit/vite';
|
||||
import adapter from '@sveltejs/adapter-node';
|
||||
import preprocess from 'svelte-preprocess';
|
||||
|
||||
// import { mdsvexGlobalComponents } from './src/lib/utils/mdsvexGlobalComponents.js/index.js';
|
||||
// config extensions
|
||||
import { mdsvex } from 'mdsvex';
|
||||
import mdsvexConfig from './mdsvex.config.js';
|
||||
/* Not using
|
||||
// import { mdsvexGlobalComponents } from './src/lib/utils/mdsvex-global-components.js';
|
||||
|
||||
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
|
@ -16,10 +11,7 @@ const config = {
|
|||
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
||||
// for more information about preprocessors
|
||||
preprocess: [
|
||||
preprocess({
|
||||
postcss: true
|
||||
}),
|
||||
vitePreprocess(),
|
||||
preprocess({ postcss: true }),
|
||||
|
||||
// No neeed rn unless using mdsvex highlighter with svelte components
|
||||
//mdsvexGlobalComponents({
|
||||
|
@ -38,8 +30,12 @@ const config = {
|
|||
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
|
||||
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
|
||||
|
||||
adapter: adapter({}),
|
||||
// sometimes problems with
|
||||
adapter: adapter({
|
||||
out: 'build',
|
||||
precompress: false
|
||||
}),
|
||||
|
||||
// Aliases need tsconfig explicit inclusion
|
||||
alias: {
|
||||
$lib: './src/lib',
|
||||
$root: './',
|
||||
|
@ -47,15 +43,6 @@ const config = {
|
|||
$routes: './src/routes',
|
||||
$content: './src/content'
|
||||
},
|
||||
// TODO: FIX Banning external malware scripts for security and privacy of users, threw errors,
|
||||
// csp: {
|
||||
// directives: {
|
||||
// 'script-src': ['self']
|
||||
// },
|
||||
// reportOnly: {
|
||||
// 'script-src': ['self']
|
||||
// }
|
||||
// },
|
||||
csrf: {
|
||||
checkOrigin: process.env.NODE_ENV === 'development' ? false : true
|
||||
},
|
||||
|
@ -66,7 +53,7 @@ const config = {
|
|||
// Handle blog trying to prerender relative links that it can't
|
||||
if (
|
||||
details.status == 404 &&
|
||||
details.path.startsWith('/blog') &&
|
||||
details.path.startsWith('/blog' && '/projects') &&
|
||||
details.referenceType == 'linked'
|
||||
) {
|
||||
console.warn(`PRERENDER ignored route ${details.path}`);
|
||||
|
|
|
@ -3,20 +3,31 @@
|
|||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"noEmit": true,
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "Bundler",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
// custom compiler options
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"sourceMap": true
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
// custom compiler options
|
||||
"noEmit": true,
|
||||
"target": "ES2018",
|
||||
"module": "ES2022",
|
||||
"moduleResolution": "Bundler",
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["./scripts/**/*", "./test/*.js", "./*.js", "mdsvex.config.ts", "svelte.config.ts"],
|
||||
"include": [
|
||||
"./scripts/**/*",
|
||||
"./test/*.js",
|
||||
"./*.js",
|
||||
"./src/**/*.d.ts",
|
||||
"./src/**/*.js",
|
||||
"./src/**/*.svelte",
|
||||
"./src/**/*.ts",
|
||||
".svelte-kit/ambient.d.ts",
|
||||
".svelte-kit/types/**/$types.d.ts",
|
||||
"./csp-directives.ts"
|
||||
],
|
||||
"exclude": ["node_modules/*"]
|
||||
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue