playin with sqlite
This commit is contained in:
1151
package-lock.json
generated
1151
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,7 @@
|
|||||||
"@mdi/font": "7.0.96",
|
"@mdi/font": "7.0.96",
|
||||||
"core-js": "^3.34.0",
|
"core-js": "^3.34.0",
|
||||||
"roboto-fontface": "*",
|
"roboto-fontface": "*",
|
||||||
"sqlite": "^5.1.1",
|
"sqlite3": "^5.1.7",
|
||||||
"vue": "^3.3.0",
|
"vue": "^3.3.0",
|
||||||
"vuetify": "^3.0.0"
|
"vuetify": "^3.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
10
src/main.ts
10
src/main.ts
@@ -13,8 +13,12 @@ import App from './App.vue'
|
|||||||
// Composables
|
// Composables
|
||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
|
|
||||||
const app = createApp(App)
|
async function run() {
|
||||||
|
const app = createApp(App)
|
||||||
|
|
||||||
registerPlugins(app)
|
registerPlugins(app)
|
||||||
|
|
||||||
app.mount('#app')
|
app.mount('#app')
|
||||||
|
}
|
||||||
|
|
||||||
|
run()
|
||||||
|
|||||||
@@ -8,10 +8,18 @@
|
|||||||
import vuetify from './vuetify'
|
import vuetify from './vuetify'
|
||||||
import pinia from '../store'
|
import pinia from '../store'
|
||||||
import router from '../router'
|
import router from '../router'
|
||||||
|
import sqliteplugin from './sqliteplugin'
|
||||||
|
|
||||||
|
import sqlite3 from 'sqlite3'
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
import type { App } from 'vue'
|
import type { App } from 'vue'
|
||||||
|
|
||||||
export function registerPlugins(app: App) {
|
const defaultDatabaseFileName = './testdb.db'
|
||||||
app.use(vuetify).use(router).use(pinia)
|
|
||||||
|
export async function registerPlugins(app: App) {
|
||||||
|
|
||||||
|
const db = new sqlite3.Database(defaultDatabaseFileName)
|
||||||
|
|
||||||
|
app.use(vuetify).use(router).use(pinia).use(sqliteplugin)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
import { open } from 'sqlite'
|
||||||
|
|
||||||
|
const defaultDatabaseFileName = './testdb.db'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
install(app, options) {
|
||||||
|
// let database = await open({
|
||||||
|
// filename: defaultDatabaseFileName,
|
||||||
|
// driver: sqlite3.Database
|
||||||
|
// })
|
||||||
|
|
||||||
|
console.log('potato')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ export enum CharacterStatus {
|
|||||||
Inactive = 'Inactive',
|
Inactive = 'Inactive',
|
||||||
Dead = 'Dead',
|
Dead = 'Dead',
|
||||||
Retired = 'Retired'
|
Retired = 'Retired'
|
||||||
|
}
|
||||||
|
|
||||||
export type Character = {
|
export type Character = {
|
||||||
status: CharacterStatus
|
status: CharacterStatus
|
||||||
|
|||||||
Reference in New Issue
Block a user