diff --git a/node_modules/.modules.yaml b/node_modules/.modules.yaml deleted file mode 100644 index 48c2340..0000000 --- a/node_modules/.modules.yaml +++ /dev/null @@ -1,21 +0,0 @@ -hoistPattern: - - '*' -hoistedDependencies: {} -included: - dependencies: true - devDependencies: true - optionalDependencies: true -layoutVersion: 5 -packageManager: pnpm@6.22.2 -pendingBuilds: [] -prunedAt: Wed, 17 Nov 2021 13:45:43 GMT -publicHoistPattern: - - '*types*' - - '*eslint*' - - '@prettier/plugin-*' - - '*prettier-plugin-*' -registries: - default: https://registry.npmjs.org/ -skipped: [] -storeDir: /home/jim/.pnpm-store/v3 -virtualStoreDir: .pnpm diff --git a/node_modules/.pnpm/lock.yaml b/node_modules/.pnpm/lock.yaml deleted file mode 100644 index f212c3c..0000000 --- a/node_modules/.pnpm/lock.yaml +++ /dev/null @@ -1,15 +0,0 @@ -lockfileVersion: 5.3 - -specifiers: - vite-plugin-fonts: ^0.2.2 - -devDependencies: - vite-plugin-fonts: 0.2.2 - -packages: - - /vite-plugin-fonts/0.2.2: - resolution: {integrity: sha512-fhzhsrTiuzlDjSO6g5sV5EVIIvbb8lmsaIY6eUTBM4lcF55x40UBpHrcyvNwIhQG211g0lu83XC7oZlkmvdkMA==} - peerDependencies: - vite: ^2.0.0 - dev: true diff --git a/node_modules/.pnpm/vite-plugin-fonts@0.2.2/node_modules/vite-plugin-fonts/README.md b/node_modules/.pnpm/vite-plugin-fonts@0.2.2/node_modules/vite-plugin-fonts/README.md deleted file mode 100644 index 6e1a6f8..0000000 --- a/node_modules/.pnpm/vite-plugin-fonts@0.2.2/node_modules/vite-plugin-fonts/README.md +++ /dev/null @@ -1,113 +0,0 @@ -# vite-plugin-fonts - -Webfont loader for vite - -### Install - -```sh -npm i --save-dev vite-plugin-fonts # yarn add -D vite-plugin-fonts -``` - -### Add it to vite.config.js - -```ts -// vite.config.js -import ViteFonts from 'vite-plugin-fonts' - -export default { - plugins: [ - ViteFonts({ - google: { - families: ['Source Sans Pro'] - }, - }) - ], -} -``` - - -## Options - -```ts -// vite.config.js -import ViteFonts from 'vite-plugin-fonts' - -export default { - plugins: [ - ViteFonts({ - // Typekit API - typekit: { - /** - * Typekit project id - */ - id: '', - - /** - * enable non-blocking renderer - * - * default: true - */ - defer: true - }, - - // Google Fonts API V2 - google: { - /** - * enable preconnect link injection - * - * default: true - */ - preconnect: false, - - /** - * values: auto, block, swap(default), fallback, optional - * default: 'swap' - */ - display: 'block', - - /** - * values: auto, block, swap(default), fallback, optional - * default: undefined - */ - text: 'ViteAwsom', - - - /** - * Fonts families lists - */ - families: [ - // families can be either strings (only regular 400 will be loaded) - 'Source Sans Pro', - - // or objects - { - /** - * Family name (required) - */ - name: 'Roboto', - - /** - * Family styles - */ - styles: 'ital,wght@0,400;1,200', - - /** - * enable non-blocking renderer - * - * default: true - */ - defer: true - } - ] - }, - }) - ], -} -``` - - -## Ressources - -- https://web.dev/optimize-webfont-loading/ -- https://csswizardry.com/2020/05/the-fastest-google-fonts/ -- _(unmaintained)_ https://www.npmjs.com/package/webfontloader \ No newline at end of file diff --git a/node_modules/.pnpm/vite-plugin-fonts@0.2.2/node_modules/vite-plugin-fonts/dist/index.d.ts b/node_modules/.pnpm/vite-plugin-fonts@0.2.2/node_modules/vite-plugin-fonts/dist/index.d.ts deleted file mode 100644 index 8dda173..0000000 --- a/node_modules/.pnpm/vite-plugin-fonts@0.2.2/node_modules/vite-plugin-fonts/dist/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { HtmlTagDescriptor } from 'vite'; - -declare type GoogleFontFamily = { - name: string; - styles?: string; - defer?: boolean; -}; -declare type GoogleFonts = { - families: (string | GoogleFontFamily)[]; - text?: string; - display?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional'; - preconnect?: boolean; -}; - -declare type TypeKitFonts = { - id: string; - defer?: boolean; -}; - -declare type VitePluginFontsOptions = { - google?: GoogleFonts; - typekit?: TypeKitFonts; -}; -declare function VitePluginFonts(options?: VitePluginFontsOptions): { - name: string; - transformIndexHtml(): HtmlTagDescriptor[]; -}; - -export default VitePluginFonts; -export { VitePluginFonts as Plugin, VitePluginFontsOptions }; diff --git a/node_modules/.pnpm/vite-plugin-fonts@0.2.2/node_modules/vite-plugin-fonts/dist/index.js b/node_modules/.pnpm/vite-plugin-fonts@0.2.2/node_modules/vite-plugin-fonts/dist/index.js deleted file mode 100644 index 9b658aa..0000000 --- a/node_modules/.pnpm/vite-plugin-fonts@0.2.2/node_modules/vite-plugin-fonts/dist/index.js +++ /dev/null @@ -1,138 +0,0 @@ -"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/google-fonts.ts -var GoogleFontsBase = "https://fonts.googleapis.com/css2"; -function injectFonts({ - families, - text, - preconnect = true, - display = "swap" -}) { - const specs = []; - const deferedSpecs = []; - const tags = []; - if (!Array.isArray(families)) { - console.warn("Google font families is required"); - return tags; - } - if (families.length >= 0) { - for (const family of families) { - if (typeof family === "string") { - deferedSpecs.push(family); - continue; - } - if (!family) - continue; - const { - name, - styles, - defer = true - } = family; - if (!name) { - console.warn("A google font family name is missing"); - continue; - } - let spec = name; - if (typeof styles === "string") - spec += `:${styles}`; - if (defer) - deferedSpecs.push(spec); - else - specs.push(spec); - } - } - if (preconnect && specs.length + deferedSpecs.length > 0) { - tags.push({ - tag: "link", - attrs: { - rel: "preconnect", - href: "https://fonts.gstatic.com/", - crossorigin: true - } - }); - } - if (deferedSpecs.length > 0) { - let href = `${GoogleFontsBase}?family=${deferedSpecs.join("&family=")}`; - if (typeof display === "string" && display !== "auto") - href += `&display=${display}`; - if (typeof text === "string" && text.length > 0) - href += `&text=${text}`; - tags.push({ - tag: "link", - attrs: { - rel: "preload", - as: "style", - onload: "this.rel='stylesheet'", - href - } - }); - } - if (specs.length > 0) { - let href = `${GoogleFontsBase}?family=${specs.join("&family=")}`; - if (typeof display === "string" && display !== "auto") - href += `&display=${display}`; - if (typeof text === "string" && text.length > 0) - href += `&text=${text}`; - tags.push({ - tag: "link", - attrs: { - rel: "stylesheet", - href - } - }); - } - return tags; -} -var google_fonts_default = injectFonts; - -// src/typekit.ts -var TypekitFontBase = "https://use.typekit.net/"; -function injectFonts2({ - id, - defer = true -}) { - const tags = []; - if (typeof id !== "string") { - console.warn("A Typekit id is required"); - return tags; - } - if (defer) { - tags.push({ - tag: "link", - attrs: { - rel: "preload", - as: "style", - onload: "this.rel='stylesheet'", - href: `${TypekitFontBase}${id}.css` - } - }); - } else { - tags.push({ - tag: "link", - attrs: { - rel: "stylesheet", - href: `${TypekitFontBase}${id}.css` - } - }); - } - return tags; -} -var typekit_default = injectFonts2; - -// src/index.ts -function VitePluginFonts(options = {}) { - return { - name: "vite-plugin-fonts", - transformIndexHtml() { - const tags = []; - if (options.typekit) - tags.push(...typekit_default(options.typekit)); - if (options.google) - tags.push(...google_fonts_default(options.google)); - return tags; - } - }; -} -var src_default = VitePluginFonts; - - - -exports.Plugin = VitePluginFonts; exports.default = src_default; diff --git a/node_modules/.pnpm/vite-plugin-fonts@0.2.2/node_modules/vite-plugin-fonts/dist/index.mjs b/node_modules/.pnpm/vite-plugin-fonts@0.2.2/node_modules/vite-plugin-fonts/dist/index.mjs deleted file mode 100644 index 2ca5c3f..0000000 --- a/node_modules/.pnpm/vite-plugin-fonts@0.2.2/node_modules/vite-plugin-fonts/dist/index.mjs +++ /dev/null @@ -1,138 +0,0 @@ -// src/google-fonts.ts -var GoogleFontsBase = "https://fonts.googleapis.com/css2"; -function injectFonts({ - families, - text, - preconnect = true, - display = "swap" -}) { - const specs = []; - const deferedSpecs = []; - const tags = []; - if (!Array.isArray(families)) { - console.warn("Google font families is required"); - return tags; - } - if (families.length >= 0) { - for (const family of families) { - if (typeof family === "string") { - deferedSpecs.push(family); - continue; - } - if (!family) - continue; - const { - name, - styles, - defer = true - } = family; - if (!name) { - console.warn("A google font family name is missing"); - continue; - } - let spec = name; - if (typeof styles === "string") - spec += `:${styles}`; - if (defer) - deferedSpecs.push(spec); - else - specs.push(spec); - } - } - if (preconnect && specs.length + deferedSpecs.length > 0) { - tags.push({ - tag: "link", - attrs: { - rel: "preconnect", - href: "https://fonts.gstatic.com/", - crossorigin: true - } - }); - } - if (deferedSpecs.length > 0) { - let href = `${GoogleFontsBase}?family=${deferedSpecs.join("&family=")}`; - if (typeof display === "string" && display !== "auto") - href += `&display=${display}`; - if (typeof text === "string" && text.length > 0) - href += `&text=${text}`; - tags.push({ - tag: "link", - attrs: { - rel: "preload", - as: "style", - onload: "this.rel='stylesheet'", - href - } - }); - } - if (specs.length > 0) { - let href = `${GoogleFontsBase}?family=${specs.join("&family=")}`; - if (typeof display === "string" && display !== "auto") - href += `&display=${display}`; - if (typeof text === "string" && text.length > 0) - href += `&text=${text}`; - tags.push({ - tag: "link", - attrs: { - rel: "stylesheet", - href - } - }); - } - return tags; -} -var google_fonts_default = injectFonts; - -// src/typekit.ts -var TypekitFontBase = "https://use.typekit.net/"; -function injectFonts2({ - id, - defer = true -}) { - const tags = []; - if (typeof id !== "string") { - console.warn("A Typekit id is required"); - return tags; - } - if (defer) { - tags.push({ - tag: "link", - attrs: { - rel: "preload", - as: "style", - onload: "this.rel='stylesheet'", - href: `${TypekitFontBase}${id}.css` - } - }); - } else { - tags.push({ - tag: "link", - attrs: { - rel: "stylesheet", - href: `${TypekitFontBase}${id}.css` - } - }); - } - return tags; -} -var typekit_default = injectFonts2; - -// src/index.ts -function VitePluginFonts(options = {}) { - return { - name: "vite-plugin-fonts", - transformIndexHtml() { - const tags = []; - if (options.typekit) - tags.push(...typekit_default(options.typekit)); - if (options.google) - tags.push(...google_fonts_default(options.google)); - return tags; - } - }; -} -var src_default = VitePluginFonts; -export { - VitePluginFonts as Plugin, - src_default as default -}; diff --git a/node_modules/.pnpm/vite-plugin-fonts@0.2.2/node_modules/vite-plugin-fonts/package.json b/node_modules/.pnpm/vite-plugin-fonts@0.2.2/node_modules/vite-plugin-fonts/package.json deleted file mode 100644 index 92ad7e7..0000000 --- a/node_modules/.pnpm/vite-plugin-fonts@0.2.2/node_modules/vite-plugin-fonts/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "vite-plugin-fonts", - "version": "0.2.2", - "description": "Webfont loader for vite", - "author": "stafyniaksacha", - "repository": "stafyniaksacha/vite-plugin-fonts", - "license": "MIT", - "main": "dist/index.js", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "files": [ - "dist" - ], - "scripts": { - "dev": "npm run build -- --watch", - "example:dev": "npm -C example run dev", - "example:build": "npm -C example run build", - "build": "tsup src/index.ts --dts --format cjs,esm", - "lint": "eslint --ext .ts ./src", - "lint:fix": "eslint --fix --ext .ts ./src" - }, - "peerDependencies": { - "vite": "^2.0.0" - }, - "devDependencies": { - "@antfu/eslint-config-ts": "^0.5.0", - "@typescript-eslint/eslint-plugin": "^4.17.0", - "eslint": "^7.22.0", - "eslint-plugin-eslint-comments": "^3.2.0", - "tsup": "^4.6.1", - "typescript": "^4.2.3", - "vite": "^2.0.5" - } -} diff --git a/node_modules/vite-plugin-fonts b/node_modules/vite-plugin-fonts deleted file mode 120000 index cb60995..0000000 --- a/node_modules/vite-plugin-fonts +++ /dev/null @@ -1 +0,0 @@ -.pnpm/vite-plugin-fonts@0.2.2/node_modules/vite-plugin-fonts \ No newline at end of file diff --git a/package.json b/package.json deleted file mode 100644 index fc57561..0000000 --- a/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "devDependencies": { - "vite-plugin-fonts": "^0.2.2" - } -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml deleted file mode 100644 index f212c3c..0000000 --- a/pnpm-lock.yaml +++ /dev/null @@ -1,15 +0,0 @@ -lockfileVersion: 5.3 - -specifiers: - vite-plugin-fonts: ^0.2.2 - -devDependencies: - vite-plugin-fonts: 0.2.2 - -packages: - - /vite-plugin-fonts/0.2.2: - resolution: {integrity: sha512-fhzhsrTiuzlDjSO6g5sV5EVIIvbb8lmsaIY6eUTBM4lcF55x40UBpHrcyvNwIhQG211g0lu83XC7oZlkmvdkMA==} - peerDependencies: - vite: ^2.0.0 - dev: true