mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-23 16:26:15 -04:00
feat: externalized tool configuration
This commit is contained in:
parent
c3adfe30ec
commit
690bd099ef
31 changed files with 387 additions and 300 deletions
16
buildModules/tool-config/plugin.ts
Normal file
16
buildModules/tool-config/plugin.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
// @ts-nocheck
|
||||
import {Plugin} from '@nuxt/types'
|
||||
import type {ToolRouteConfig} from '~/types/ToolConfig';
|
||||
|
||||
declare module 'vue/types/vue' {
|
||||
interface Vue {
|
||||
$toolListFlat: ToolRouteConfig[]
|
||||
$toolList: { [key: string]: ToolRouteConfig[] }
|
||||
}
|
||||
}
|
||||
|
||||
const plugin: Plugin = (_, inject) => {
|
||||
inject('toolListFlat', <%= serialize(options.toolListFlat) %>)
|
||||
inject('toolList', <%= serialize(options.toolList) %>)
|
||||
}
|
||||
export default plugin
|
Loading…
Add table
Add a link
Reference in a new issue