-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
171 changed files
with
3,882 additions
and
4,453 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/// <reference types="vite/client" /> | ||
/// <reference types="unplugin-icons/types/vue3" /> | ||
|
||
// this file contains public types which are exposed to external modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// @ts-ignore | ||
declare const defineConfig: import('nuxt/config').DefineNuxtConfig | ||
|
||
export { defineConfig } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// @ts-check | ||
|
||
import { fileURLToPath } from 'node:url' | ||
import icons from 'unplugin-icons/nuxt' | ||
import { mergeConfig } from 'vite' | ||
import { baseConfig as baseViteConfig } from './vite.js' | ||
|
||
delete baseViteConfig.plugins | ||
delete baseViteConfig.resolve?.alias | ||
|
||
export const baseConfig = { | ||
alias: { sefirot: fileURLToPath(new URL('../lib', import.meta.url)) }, | ||
app: { teleportId: 'sefirot-modals' }, | ||
modules: [ | ||
/** | ||
* @param {any} _ | ||
* @param {any} nuxt | ||
*/ | ||
function (_, nuxt) { | ||
// eslint-disable-next-line @typescript-eslint/no-invalid-this | ||
return icons.bind(this, { scale: 1 }, nuxt)() | ||
} | ||
], | ||
postcss: { plugins: { 'postcss-nested': {} } }, | ||
telemetry: false, | ||
vite: baseViteConfig | ||
} | ||
|
||
export function defineConfig(config = {}) { | ||
return mergeConfig(baseConfig, config) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
declare const baseConfig: import('vite').UserConfig | ||
|
||
declare function defineConfig(config?: import('vite').UserConfig): import('vite').UserConfig | ||
declare function defineConfig(config?: Promise<import('vite').UserConfig>): Promise<import('vite').UserConfig> | ||
declare function defineConfig(config?: import('vite').UserConfigFnObject): import('vite').UserConfigFnObject | ||
declare function defineConfig(config?: import('vite').UserConfigExport): import('vite').UserConfigExport | ||
|
||
export { baseConfig, defineConfig } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// @ts-check | ||
|
||
/** | ||
* Adapted from | ||
* @see https://github.com/unplugin/unplugin-icons/blob/67fd9b7791dc1754cb8dc46b854b22c8bb4cf380/src/core/compilers/vue3.ts | ||
* @see https://github.com/unplugin/unplugin-icons/blob/639ec9691e022e52c641d0f96f585dbf04dab095/src/core/svgId.ts | ||
* | ||
* Original licenses: | ||
* | ||
* Copyright (c) 2020 Anthony Fu <https://github.com/antfu> | ||
* @license MIT | ||
*/ | ||
|
||
import { fileURLToPath } from 'node:url' | ||
import icons from 'unplugin-icons/vite' | ||
import { mergeConfig } from 'vite' | ||
|
||
/** @type {import('vite').UserConfig} */ | ||
export const baseConfig = { | ||
plugins: [icons({ scale: 1 })], | ||
|
||
resolve: { | ||
alias: { 'sefirot/': fileURLToPath(new URL('../lib/', import.meta.url)) }, | ||
|
||
dedupe: [ | ||
'@sentry/browser', | ||
'@tanstack/vue-virtual', | ||
'@tinyhttp/content-disposition', | ||
'@tinyhttp/cookie', | ||
'@vue/reactivity', | ||
'@vuelidate/core', | ||
'@vuelidate/validators', | ||
'@vueuse/core', | ||
'body-scroll-lock', | ||
'dayjs', | ||
'file-saver', | ||
'fuse.js', | ||
'lodash-es', | ||
'markdown-it', | ||
'normalize.css', | ||
'ofetch', | ||
'pinia', | ||
'qs', | ||
'v-calendar', | ||
'vue-router', | ||
'vue' | ||
] | ||
}, | ||
|
||
ssr: { noExternal: [/sentry/] }, | ||
|
||
optimizeDeps: { | ||
include: [ | ||
'dayjs', | ||
'dayjs/plugin/relativeTime', | ||
'dayjs/plugin/timezone', | ||
'dayjs/plugin/utc', | ||
'markdown-it' | ||
] | ||
} | ||
} | ||
|
||
/** | ||
* @param {import('vite').UserConfigExport} config | ||
*/ | ||
export function defineConfig(config = {}) { | ||
return async (/** @type {import("vite").ConfigEnv} */ configEnv) => | ||
mergeConfig(baseConfig, await (typeof config === 'function' ? config(configEnv) : config)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.