Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 0 additions & 50 deletions demo/react-app/README.md

This file was deleted.

37 changes: 37 additions & 0 deletions demo/react-app/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,40 @@
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
}

p {
font-size: x-large;
}

.google-poppins {
font-family: "Poppins", sans-serif;
}

.google-press-start {
font-family: "Press Start 2P", sans-serif;
}

.bunny-aclonica {
font-family: "Aclonica", sans-serif;
}

.bunny-allan {
font-family: "Allan", sans-serif;
}

.font-share-panchang {
font-family: "Panchang", sans-serif;
}

.font-source-luckiest {
font-family: "Luckiest Guy", sans-serif;
}

@font-face {
font-family: "Black Fox";
src: url("./black-fox.ttf");
}

.local {
font-family: "Black Fox", sans-serif;
}
24 changes: 24 additions & 0 deletions demo/vanilla-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
13 changes: 13 additions & 0 deletions demo/vanilla-app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + TS</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
15 changes: 15 additions & 0 deletions demo/vanilla-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "vanilla-app",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"devDependencies": {
"typescript": "~5.6.2",
"vite": "^6.0.5"
}
}
1 change: 1 addition & 0 deletions demo/vanilla-app/public/vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/vanilla-app/src/black-fox.ttf
Binary file not shown.
22 changes: 22 additions & 0 deletions demo/vanilla-app/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import './style.css';

document.querySelector<HTMLDivElement>('#app')!.innerHTML = `
<div>
<h1>Google</h1>
<p class="poppins">Poppins</p>
<p class="press-start">Press Start 2P</p>

<h1>Bunny</h1>
<p class="bunny-aclonica">Aclonica</p>
<p class="bunny-allan">Allan</p>

<h1>FontShare</h1>
<p class="font-share-panchang">Panchang</p>

<h1>FontSource</h1>
<p class="font-source-luckiest">Luckiest</p>

<h1>Local</h1>
<p class="local">Local font</p>
</div>
`;
41 changes: 41 additions & 0 deletions demo/vanilla-app/src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
:root {
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
}

p {
font-size: x-large;
}

.google-poppins {
font-family: "Poppins", sans-serif;
}

.google-press-start {
font-family: "Press Start 2P", sans-serif;
}

.bunny-aclonica {
font-family: "Aclonica", sans-serif;
}

.bunny-allan {
font-family: "Allan", sans-serif;
}

.font-share-panchang {
font-family: "Panchang", sans-serif;
}

.font-source-luckiest {
font-family: "Luckiest Guy", sans-serif;
}

@font-face {
font-family: "Black Fox";
src: url("./black-fox.ttf");
}

.local {
font-family: "Black Fox", sans-serif;
}
1 change: 1 addition & 0 deletions demo/vanilla-app/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
24 changes: 24 additions & 0 deletions demo/vanilla-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["src"]
}
7 changes: 7 additions & 0 deletions demo/vanilla-app/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from 'vite';
import { fontless } from '../../lib/vite/plugin';

// https://vite.dev/config/
export default defineConfig({
plugins: [fontless()],
});
Loading