🚀 meta: initial commit

This commit is contained in:
Jacob Babich
2021-03-30 13:28:52 -04:00
commit 2ac0c9862d
21 changed files with 3439 additions and 0 deletions

20
.eslintrc.cjs Normal file
View File

@@ -0,0 +1,20 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
plugins: ['svelte3', '@typescript-eslint'],
ignorePatterns: ['*.cjs'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
'svelte3/typescript': require('typescript')
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2018
},
env: {
browser: true,
es2017: true,
node: true
}
};

6
.gitignore vendored Normal file
View File

@@ -0,0 +1,6 @@
.DS_Store
node_modules
/.svelte
/build
/functions
.history

4
.prettierignore Normal file
View File

@@ -0,0 +1,4 @@
.svelte/**
static/**
build/**
node_modules/**

6
.prettierrc Normal file
View File

@@ -0,0 +1,6 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100
}

2
README.md Normal file
View File

@@ -0,0 +1,2 @@
# My University Website
This is a micro-project for my personal domain at my university's web server.

22
mdsvex.config.cjs Normal file
View File

@@ -0,0 +1,22 @@
module.exports = {
extensions: [".svx", ".md"],
smartypants: {
dashes: "oldschool",
},
remarkPlugins: [
// [require("remark-github"), {
// // Use your own repository
// repository: "https://github.com/svelte-add/mdsvex.git",
// }],
require("remark-abbr"),
],
rehypePlugins: [
// require("rehype-slug"),
// [require("rehype-autolink-headings"), {
// behavior: "wrap",
// }],
],
layout: {
_: "./src/routes/_centered-prose.svelte",
},
};

44
package.json Normal file
View File

@@ -0,0 +1,44 @@
{
"name": "@babichjacob/university-website",
"version": "0.0.1",
"scripts": {
"dev": "svelte-kit dev",
"build": "svelte-kit build",
"start": "svelte-kit start",
"lint": "prettier --check . && eslint --ignore-path .gitignore .",
"format": "prettier --write ."
},
"devDependencies": {
"@sveltejs/adapter-node": "next",
"@sveltejs/adapter-static": "^1.0.0-next.4",
"@sveltejs/kit": "next",
"@tailwindcss/jit": "^0.1.1",
"@tailwindcss/typography": "^0.4.0",
"@typescript-eslint/eslint-plugin": "^4.19.0",
"@typescript-eslint/parser": "^4.19.0",
"autoprefixer": "^10.2.5",
"cssnano": "^4.1.10",
"eslint": "^7.22.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-svelte3": "^3.1.0",
"mdsvex": "^0.8.9",
"postcss": "^8.2.7",
"postcss-load-config": "^3.0.1",
"prettier": "~2.2.1",
"prettier-plugin-svelte": "^2.2.0",
"rehype-autolink-headings": "^5.0.1",
"rehype-slug": "^4.0.1",
"remark-abbr": "^1.4.1",
"remark-github": "^10.0.1",
"svelte": "^3.29.0",
"svelte-preprocess": "^4.6.9",
"tailwindcss": "^2.0.3",
"tslib": "^2.0.0",
"typescript": "^4.0.0",
"vite": "^2.1.0"
},
"type": "module",
"engines": {
"node": ">= 12.17.0"
}
}

3168
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

22
postcss.config.cjs Normal file
View File

@@ -0,0 +1,22 @@
const tailwindcss = require("@tailwindcss/jit");
const autoprefixer = require("autoprefixer");
const cssnano = require("cssnano");
const mode = process.env.NODE_ENV;
const dev = mode === "development";
module.exports = {
plugins: [
// Some plugins, like postcss-nested, need to run before Tailwind
tailwindcss,
// But others, like autoprefixer, need to run after
autoprefixer,
!dev && cssnano({
preset: "default",
}),
],
};

3
src/app.css Normal file
View File

@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

12
src/app.html Normal file
View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%svelte.head%
</head>
<body>
<div id="svelte">%svelte.body%</div>
</body>
</html>

3
src/global.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
/// <reference types="@sveltejs/kit" />
/// <reference types="svelte" />
/// <reference types="vite/client" />

View File

@@ -0,0 +1,5 @@
<script>
import "../app.css";
</script>
<slot />

View File

@@ -0,0 +1,7 @@
<script>
import Prose from "./_prose.svelte";
</script>
<div class="flex justify-center">
<Prose><slot /></Prose>
</div>

BIN
src/routes/_me.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 KiB

3
src/routes/_prose.svelte Normal file
View File

@@ -0,0 +1,3 @@
<article class="prose">
<slot />
</article>

17
src/routes/index.svx Normal file
View File

@@ -0,0 +1,17 @@
<script>
import photoOfMe from "./_me.png";
</script>
# J / Jacob Babich
![Photo of me]({photoOfMe})
**Student at the University of Michigan-Dearborn**
Cool facts about me:
* I'm seeking a computer engineering and electrical engineering dual degree.
Beware that this site is extremely likely to go out of date! I'd like to keep it updated but that might not be a high priority.
---
*This website's source code is available on [GitHub](https://github.com/babichjacob/university-website)*

3
static/robots.txt Normal file
View File

@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:

32
svelte.config.cjs Normal file
View File

@@ -0,0 +1,32 @@
const { mdsvex } = require("mdsvex");
const mdsvexConfig = require("./mdsvex.config.cjs");
const sveltePreprocess = require('svelte-preprocess');
const static = require('@sveltejs/adapter-static');
const pkg = require('./package.json');
/** @type {import('@sveltejs/kit').Config} */
module.exports = {
extensions: [".svelte", ...mdsvexConfig.extensions],
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: [
mdsvex(mdsvexConfig),
sveltePreprocess({
defaults: {
style: "postcss",
},
}),
],
kit: {
adapter: static(),
// hydrate the <div id="svelte"> element in src/app.html
target: '#svelte',
vite: {
ssr: {
noExternal: Object.keys(pkg.dependencies || {})
}
}
}
};

31
tailwind.config.cjs Normal file
View File

@@ -0,0 +1,31 @@
const { tailwindExtractor } = require("tailwindcss/lib/lib/purgeUnusedStyles");
module.exports = {
purge: {
content: [
"./src/**/*.{html,js,svelte,ts}",
],
options: {
defaultExtractor: (content) => [
// If this stops working, please open an issue at https://github.com/svelte-add/tailwindcss/issues rather than bothering Tailwind Labs about it
...tailwindExtractor(content),
// Match Svelte class: directives (https://github.com/tailwindlabs/tailwindcss/discussions/1731)
...[...content.matchAll(/(?:class:)*([\w\d-/:%.]+)/gm)].map(([_match, group, ..._rest]) => group),
],
keyframes: true,
},
},
theme: {
extend: {
fontFamily: {
sans: ["system-ui", "Helvetica", "Arial", "sans-serif"]
}
},
},
variants: {
extend: {},
},
plugins: [
require("@tailwindcss/typography"),
],
};

29
tsconfig.json Normal file
View File

@@ -0,0 +1,29 @@
{
"compilerOptions": {
"moduleResolution": "node",
"target": "es2018",
/**
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
to enforce using \`import type\` instead of \`import\` for Types.
*/
"importsNotUsedAsValues": "error",
"isolatedModules": true,
/**
To have warnings/errors of the Svelte compiler at the correct position,
enable source maps by default.
*/
"sourceMap": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"allowJs": true,
"checkJs": true,
"paths": {
"$app/*": [".svelte/dev/runtime/app/*", ".svelte/build/runtime/app/*"],
"$service-worker": [".svelte/build/runtime/service-worker"],
"$lib/*": ["src/lib/*"]
}
},
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.ts", "src/**/*.svelte"]
}