mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-16 13:59:59 +00:00
feat: allow using elk as a nuxt layer (#1665)
This commit is contained in:
parent
a3310b6ea2
commit
c25715b26d
4 changed files with 403 additions and 1111 deletions
|
@ -1,5 +1,5 @@
|
|||
import { readFile } from 'fs-extra'
|
||||
import { resolve } from 'pathe'
|
||||
import { createResolver } from '@nuxt/kit'
|
||||
import type { ManifestOptions } from 'vite-plugin-pwa'
|
||||
import { getEnv } from '../../config/env'
|
||||
import { i18n } from '../../config/i18n'
|
||||
|
@ -170,8 +170,9 @@ export const createI18n = async (): Promise<LocalizedWebManifest> => {
|
|||
}
|
||||
|
||||
async function readI18nFile(file: string) {
|
||||
const { resolve } = createResolver(import.meta.url)
|
||||
return JSON.parse(Buffer.from(
|
||||
await readFile(resolve(`./locales/${file}`), 'utf-8'),
|
||||
await readFile(resolve(`../../locales/${file}`), 'utf-8'),
|
||||
).toString())
|
||||
}
|
||||
|
||||
|
|
|
@ -4,8 +4,13 @@ import { check } from 'stale-dep'
|
|||
export default defineNuxtModule({
|
||||
meta: {
|
||||
name: 'stale-dep',
|
||||
configKey: 'staleDep',
|
||||
},
|
||||
setup() {
|
||||
return check('pnpm')
|
||||
defaults: {
|
||||
enabled: true,
|
||||
},
|
||||
setup(opts) {
|
||||
if (opts.enabled)
|
||||
return check('pnpm')
|
||||
},
|
||||
})
|
||||
|
|
78
package.json
78
package.json
|
@ -1,10 +1,11 @@
|
|||
{
|
||||
"name": "@elk-zone/elk",
|
||||
"type": "module",
|
||||
"version": "0.7.2",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@7.9.0",
|
||||
"license": "MIT",
|
||||
"homepage": "https://elk.zone/",
|
||||
"main": "./nuxt.config.ts",
|
||||
"scripts": {
|
||||
"build": "nuxi build",
|
||||
"dev": "nuxi dev --port 5314",
|
||||
|
@ -16,19 +17,30 @@
|
|||
"start:https": "PORT=5314 node ./https-dev-config/local-https-server.mjs",
|
||||
"lint": "eslint --cache .",
|
||||
"typecheck": "stale-dep && nuxi typecheck",
|
||||
"prepare": "esno scripts/prepare.ts",
|
||||
"prepare": "ignore-dependency-scripts \"esno scripts/prepare.ts\"",
|
||||
"generate": "nuxi generate",
|
||||
"test:unit": "stale-dep && vitest",
|
||||
"test:typecheck": "stale-dep && vue-tsc --noEmit && vue-tsc --noEmit --project service-worker/tsconfig.json",
|
||||
"test": "nr test:unit",
|
||||
"update:team:avatars": "esno scripts/avatars.ts",
|
||||
"postinstall": "stale-dep -u && simple-git-hooks && nuxi prepare",
|
||||
"postinstall": "ignore-dependency-scripts \"stale-dep -u && simple-git-hooks && nuxi prepare\"",
|
||||
"release": "stale-dep && bumpp && esno scripts/release.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emoji-mart/data": "^1.1.2",
|
||||
"@fnando/sparkline": "^0.3.10",
|
||||
"@iconify-emoji/twemoji": "^1.0.2",
|
||||
"@iconify-json/carbon": "^1.1.14",
|
||||
"@iconify-json/logos": "^1.1.22",
|
||||
"@iconify-json/material-symbols": "^1.1.26",
|
||||
"@iconify-json/mdi": "^1.1.44",
|
||||
"@iconify-json/ph": "^1.1.3",
|
||||
"@iconify-json/ri": "^1.1.4",
|
||||
"@iconify-json/twemoji": "^1.1.10",
|
||||
"@iconify/utils": "^2.0.12",
|
||||
"@nuxtjs/color-mode": "^3.2.0",
|
||||
"@nuxtjs/i18n": "8.0.0-beta.9",
|
||||
"@pinia/nuxt": "^0.4.6",
|
||||
"@tiptap/extension-character-count": "2.0.0-beta.204",
|
||||
"@tiptap/extension-code-block": "2.0.0-beta.204",
|
||||
"@tiptap/extension-history": "2.0.0-beta.204",
|
||||
|
@ -39,51 +51,63 @@
|
|||
"@tiptap/starter-kit": "2.0.0-beta.204",
|
||||
"@tiptap/suggestion": "2.0.0-beta.204",
|
||||
"@tiptap/vue-3": "2.0.0-beta.204",
|
||||
"@unocss/nuxt": "^0.49.0",
|
||||
"@vue-macros/nuxt": "^1.0.3",
|
||||
"@vueuse/core": "^9.11.1",
|
||||
"@vueuse/gesture": "2.0.0-beta.1",
|
||||
"@vueuse/integrations": "^9.11.1",
|
||||
"@vueuse/math": "^9.11.1",
|
||||
"@vueuse/motion": "2.0.0-beta.12",
|
||||
"@vueuse/nuxt": "^9.11.1",
|
||||
"blurhash": "^2.0.4",
|
||||
"browser-fs-access": "^0.31.2",
|
||||
"chroma-js": "^2.4.2",
|
||||
"emoji-mart": "^5.5.2",
|
||||
"file-saver": "^2.0.5",
|
||||
"floating-vue": "2.0.0-beta.20",
|
||||
"focus-trap": "^7.2.0",
|
||||
"form-data": "^4.0.0",
|
||||
"fuse.js": "^6.6.2",
|
||||
"github-reserved-names": "^2.0.4",
|
||||
"idb-keyval": "^6.2.0",
|
||||
"ignore-dependency-scripts": "^1.0.1",
|
||||
"iso-639-1": "^2.1.15",
|
||||
"js-yaml": "^4.1.0",
|
||||
"lru-cache": "^7.14.1",
|
||||
"masto": "^5.6.1",
|
||||
"nuxt-security": "^0.10.1",
|
||||
"nuxt-vitest": "^0.6.4",
|
||||
"page-lifecycle": "^0.1.2",
|
||||
"pinia": "^2.0.29",
|
||||
"postcss-nested": "^6.0.0",
|
||||
"rollup-plugin-node-polyfills": "^0.2.1",
|
||||
"shiki": "^0.12.1",
|
||||
"shiki-es": "^0.2.0",
|
||||
"simple-git": "^3.16.0",
|
||||
"slimeform": "^0.9.0",
|
||||
"stale-dep": "^0.3.1",
|
||||
"std-env": "^3.3.1",
|
||||
"string-length": "^5.0.1",
|
||||
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log",
|
||||
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
|
||||
"theme-vitesse": "^0.6.0",
|
||||
"tiny-decode": "^0.1.3",
|
||||
"tippy.js": "^6.3.7",
|
||||
"ufo": "^1.0.1",
|
||||
"ultrahtml": "^1.2.0",
|
||||
"unimport": "^2.1.0",
|
||||
"unplugin-auto-import": "^0.13.0",
|
||||
"unplugin-vue-inspector": "^0.0.2",
|
||||
"vite-plugin-inspect": "^0.7.14",
|
||||
"vite-plugin-pwa": "^0.14.1",
|
||||
"vue-advanced-cropper": "^2.8.8",
|
||||
"vue-virtual-scroller": "2.0.0-beta.7"
|
||||
"vue-virtual-scroller": "2.0.0-beta.7",
|
||||
"workbox-build": "^6.5.4",
|
||||
"workbox-window": "^6.5.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^0.34.1",
|
||||
"@antfu/ni": "^0.19.0",
|
||||
"@emoji-mart/data": "^1.1.2",
|
||||
"@iconify-json/carbon": "^1.1.14",
|
||||
"@iconify-json/logos": "^1.1.22",
|
||||
"@iconify-json/material-symbols": "^1.1.26",
|
||||
"@iconify-json/mdi": "^1.1.44",
|
||||
"@iconify-json/ph": "^1.1.3",
|
||||
"@iconify-json/ri": "^1.1.4",
|
||||
"@iconify-json/twemoji": "^1.1.10",
|
||||
"@nuxtjs/color-mode": "^3.2.0",
|
||||
"@nuxtjs/i18n": "8.0.0-beta.9",
|
||||
"@pinia/nuxt": "^0.4.6",
|
||||
"@types/chroma-js": "^2.1.4",
|
||||
"@types/file-saver": "^2.0.5",
|
||||
"@types/fnando__sparkline": "^0.3.4",
|
||||
|
@ -91,39 +115,17 @@
|
|||
"@types/js-yaml": "^4.0.5",
|
||||
"@types/prettier": "^2.7.2",
|
||||
"@types/wicg-file-system-access": "^2020.9.5",
|
||||
"@unocss/nuxt": "^0.49.0",
|
||||
"@vue-macros/nuxt": "^1.0.3",
|
||||
"@vueuse/math": "^9.11.1",
|
||||
"@vueuse/nuxt": "^9.11.1",
|
||||
"bumpp": "^8.2.1",
|
||||
"chroma-js": "^2.4.2",
|
||||
"emoji-mart": "^5.5.2",
|
||||
"eslint": "^8.32.0",
|
||||
"esno": "^0.16.3",
|
||||
"file-saver": "^2.0.5",
|
||||
"fs-extra": "^11.1.0",
|
||||
"lint-staged": "^13.1.0",
|
||||
"nuxt": "3.1.1",
|
||||
"nuxt-security": "^0.10.1",
|
||||
"nuxt-vitest": "^0.6.4",
|
||||
"postcss-nested": "^6.0.0",
|
||||
"prettier": "^2.8.3",
|
||||
"rollup-plugin-node-polyfills": "^0.2.1",
|
||||
"simple-git": "^3.16.0",
|
||||
"simple-git-hooks": "^2.8.1",
|
||||
"stale-dep": "^0.3.1",
|
||||
"std-env": "^3.3.1",
|
||||
"theme-vitesse": "^0.6.0",
|
||||
"typescript": "^4.9.5",
|
||||
"unimport": "^2.1.0",
|
||||
"unplugin-auto-import": "^0.13.0",
|
||||
"unplugin-vue-inspector": "^0.0.2",
|
||||
"vite-plugin-inspect": "^0.7.14",
|
||||
"vite-plugin-pwa": "^0.14.1",
|
||||
"vitest": "^0.28.4",
|
||||
"vue-tsc": "^1.0.24",
|
||||
"workbox-build": "^6.5.4",
|
||||
"workbox-window": "^6.5.4"
|
||||
"vue-tsc": "^1.0.24"
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
|
|
1422
pnpm-lock.yaml
1422
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue