diff --git a/.gitignore b/.gitignore index 0945ee5..6d4c0aa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -sass/@** - # build output dist/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e69de29 diff --git a/.justfile b/.justfile index a922584..ee0b6e0 100644 --- a/.justfile +++ b/.justfile @@ -6,6 +6,3 @@ dev: build: @zola build - -link-dependencies: - bun run _scripts/link-dependencies.ts diff --git a/_scripts/link-dependencies.ts b/_scripts/link-dependencies.ts deleted file mode 100644 index f78417a..0000000 --- a/_scripts/link-dependencies.ts +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bun - -import { fileURLToPath } from 'url'; -import fs from "node:fs/promises"; -import { basename, normalize } from "node:path"; - -function ignore_exist_error(fn: (...args: any[]) => Promise) { - return async (...args: any[]) => { - try { - await fn(...args); - } catch (error: any) { - if (error.code !== 'EEXIST') { - throw error; // Re-throw the error if it's not "file exists" - } - } - } -} - -const mkdir = ignore_exist_error(fs.mkdir); -const symlink = ignore_exist_error(fs.symlink); - - -const def = await Bun.file("package.json").json(); - -const dependencies = Object.keys(def.dependencies); - -for (const pkg of dependencies) { - const path = normalize(fileURLToPath(import.meta.resolve(pkg))); - const file = Bun.file(import.meta.resolve(pkg)); - const type = file.type.split(";").at(0); - const filename = basename(path); - - switch (type) { - case "text/x-scss": - await mkdir(`sass/${pkg}`) - await symlink(path, `sass/${pkg}/${filename}`); - console.log(`${path} -> sass/${pkg}/${filename}`) - break; - case "text/javascript": - // console.log("es JS") - break; - } - -} - -console.log(); -console.log("Dependencies linked!"); diff --git a/bun.lockb b/bun.lockb deleted file mode 100755 index fd62c1f..0000000 Binary files a/bun.lockb and /dev/null differ diff --git a/bunfig.toml b/bunfig.toml deleted file mode 100644 index e655138..0000000 --- a/bunfig.toml +++ /dev/null @@ -1,2 +0,0 @@ -[install.scopes] -mini-strap = "https://git.alecodes.page/api/packages/alecodes/npm/" diff --git a/package.json b/package.json index 3497cc4..b13addf 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,11 @@ { "name": "personal-page", - "version": "0.3.0", - "module": "index.ts", - "devDependencies": { - "typescript": "^5.2.2", - "@types/bun": "latest" - }, - "scripts": {}, "type": "module", + "version": "0.3.0", + "scripts": { }, "dependencies": { - "@mini-strap/core": "^0.1.0" + }, + "devDependencies": { + "typescript": "^5.2.2" } -} \ No newline at end of file +} diff --git a/sass/style.scss b/sass/style.scss deleted file mode 100644 index e903ac2..0000000 --- a/sass/style.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "@mini-strap/core/style.scss"; - -html { - // background-color: red; -} diff --git a/templates/base.html b/templates/base.html index e6c7a35..f258847 100644 --- a/templates/base.html +++ b/templates/base.html @@ -13,7 +13,6 @@ - diff --git a/tsconfig.json b/tsconfig.json index 238655f..bab51e4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,27 +1,20 @@ { + "extends": "astro/tsconfigs/strict", "compilerOptions": { - // Enable latest features - "lib": ["ESNext", "DOM"], - "target": "ESNext", - "module": "ESNext", - "moduleDetection": "force", "jsx": "react-jsx", - "allowJs": true, - - // Bundler mode - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, + "jsxImportSource": "react", "verbatimModuleSyntax": true, - "noEmit": true, - - // Best practices - "strict": true, - "skipLibCheck": true, - "noFallthroughCasesInSwitch": true, - - // Some stricter flags (disabled by default) - "noUnusedLocals": false, - "noUnusedParameters": false, - "noPropertyAccessFromIndexSignature": false + "baseUrl": ".", + "paths": { + "@components/*": ["src/components/*"], + "@layouts/*": ["src/layouts/*"], + "@assets/*": ["src/assets/*"], + "@locales/*": ["public/locales/*"] + }, + "plugins": [ + { + "name": "@astrojs/ts-plugin" + } + ] } }