[READ-ONLY] Mirror of https://github.com/probablykasper/ferrum. Music library app for Mac, Linux and Windows ferrum.kasper.space
electron linux macos music music-library music-player napi windows
0

Configure Feed

Select the types of activity you want to include in your feed.

Fix typescript config, keep local font Open Sans

Kasper (Mar 23, 2021, 12:23 AM +0100) a118ce78 2d75bb7c

+18 -57
src/assets/OpenSans-Regular.ttf

This is a binary file and will not be displayed.

+4
src/assets/fonts.css
··· 1 + @font-face { 2 + font-family: 'Open Sans'; 3 + src: url('./OpenSans-Regular.ttf'); 4 + }
+3 -3
src/index.html
··· 2 2 <html lang="en"> 3 3 <head> 4 4 <meta charset="utf-8" /> 5 - <meta name="viewport" content="width=device-width,initial-scale=1" /> 5 + <meta name="viewport" content="width=device-width, initial-scale=1" /> 6 6 7 7 <link rel="preconnect" href="https://fonts.gstatic.com" /> 8 - <link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet" /> 8 + <link href="./assets/fonts.css" rel="stylesheet" /> 9 9 10 10 <link rel="icon" type="image/png" href="/favicon.png" /> 11 11 </head> 12 12 <body> 13 - <script defer type="module" src="./main.js"></script> 13 + <script defer type="module" src="./main.ts"></script> 14 14 </body> 15 15 </html>
src/main.js src/main.ts
+11 -54
tsconfig.json
··· 1 1 { 2 2 "compilerOptions": { 3 - "moduleResolution": "node", 4 3 "target": "esnext", 5 4 "module": "esnext", 6 - /** 7 - * svelte-preprocess cannot figure out whether you have 8 - * a value or a type, so tell TypeScript to enforce using 9 - * `import type` instead of `import` for Types. 10 - */ 5 + "moduleResolution": "node", 6 + 7 + // require `import type` instead fo `import` for types 8 + // svelte-preprocess apparently needs this 11 9 "importsNotUsedAsValues": "error", 12 10 "isolatedModules": true, 13 - /** 14 - * To have warnings / errors of the Svelte compiler at the 15 - * correct position, enable source maps by default. 16 - */ 11 + 12 + // To have svelte warnings/errors correct position 17 13 "sourceMap": true, 14 + 15 + // Prevent type errors 16 + "types": ["svelte", "node", "wicg-mediasession"], 17 + 18 + "strict": true, 18 19 "esModuleInterop": true, 19 20 "skipLibCheck": true, 20 21 "forceConsistentCasingInFileNames": true, 21 22 "baseUrl": "." 22 - /** 23 - * Typecheck JS in `.svelte` and `.js` files by default. 24 - * Disable checkJs if you'd like to use dynamic types in JS. 25 - * Note that setting allowJs false does not prevent the use 26 - * of JS in `.svelte` files. 27 - */ 28 - // "allowJs": true, 29 - // "checkJs": true 30 23 }, 31 - /** 32 - * Use globals.d.ts instead of compilerOptions.types 33 - * to avoid limiting type declarations. 34 - */ 35 - // "include": ["globals.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"] 36 - // "include": ["globals.d.ts", "src/**/*.ts", "src/**/*.svelte"] 37 24 "include": ["src/**/*.ts", "src/**/*.svelte"] 38 25 } 39 - 40 - // // Old tsconfig: 41 - // { 42 - // "include": ["src", "types"], 43 - // "compilerOptions": { 44 - // "module": "esnext", 45 - // "target": "esnext", 46 - // "moduleResolution": "node", 47 - // "jsx": "preserve", 48 - // "baseUrl": "./", 49 - 50 - // // For snowpack import aliases 51 - // "paths": {}, 52 - 53 - // // Snowpack will handle emitting/building 54 - // "noEmit": true, 55 - 56 - // // Additional options 57 - // "types": ["svelte", "node", "wicg-mediasession"], 58 - // "sourceMap": true, 59 - // "esModuleInterop": true, 60 - // "strict": true, 61 - // "skipLibCheck": true, 62 - // "forceConsistentCasingInFileNames": true, 63 - // "resolveJsonModule": true, 64 - // "useDefineForClassFields": true, 65 - // "allowSyntheticDefaultImports": true, 66 - // "importsNotUsedAsValues": "error" 67 - // } 68 - // }