Skip to content

Commit

Permalink
style(biome): format files and configure for vcs (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
arunanshub authored Feb 9, 2024
1 parent 1503619 commit baea02d
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 14 deletions.
5 changes: 5 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@
},
"javascript": {
"formatter": { "semicolons": "asNeeded", "quoteStyle": "single" }
},
"vcs": {
"enabled": true,
"useIgnoreFile": true,
"clientKind": "git"
}
}
3 changes: 1 addition & 2 deletions drizzle.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export default {
schema: 'src/server/database/schema/*',
driver: 'mysql2',
dbCredentials: {
uri: process.env.DATABASE_URL!,
database: process.env.DATABASE_NAME!,
uri: process.env.DATABASE_URL as NonNullable<string>,
},
} satisfies Config
7 changes: 6 additions & 1 deletion migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import 'dotenv/config'
import { migrate } from 'drizzle-orm/planetscale-serverless/migrator'
import { getDb } from '~/server/database/db'

const databaseUrl = process.env.DATABASE_URL

if (!databaseUrl) {
throw Error('Database URL not configured in environment variable')
}
// This will run migrations on the database, skipping the ones already applied
await migrate(getDb(process.env.DATABASE_URL!), {
await migrate(getDb(databaseUrl), {
migrationsFolder: './src/server/database/migrations',
})
34 changes: 23 additions & 11 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import browserslistToEsbuild from 'browserslist-to-esbuild'
import tailwindTypography from '@tailwindcss/typography'
import browserslistToEsbuild from 'browserslist-to-esbuild'

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
// General
srcDir: 'src/',
app: {
head: {
titleTemplate: `%s · Distrohop`,
titleTemplate: '%s · Distrohop',
// manually add lang until we use nuxt-i18n
htmlAttrs: { lang: 'en' },
},
Expand All @@ -19,14 +19,26 @@ export default defineNuxtConfig({
},

// Modules
modules: [// Image Handling and Optimization
'@nuxt/image', // Performance Optimization
'@nuxtjs/critters', 'nuxt-delay-hydration', // Content Management
'@nuxt/content', // Utility Functions
'@vueuse/nuxt', // Fonts and Typography
'@nuxtjs/fontaine', '@nuxtjs/google-fonts', '@nuxtjs/tailwindcss', // SEO and Crawling
'@nuxtjs/robots', // Icons
'nuxt-icon', "nuxt-build-cache"],
modules: [
// Image Handling and Optimization
'@nuxt/image',
// Performance Optimization
'@nuxtjs/critters',
'nuxt-delay-hydration',
// Content Management
'@nuxt/content',
// Utility Functions
'@vueuse/nuxt',
// Fonts and Typography
'@nuxtjs/fontaine',
'@nuxtjs/google-fonts',
'@nuxtjs/tailwindcss',
// SEO and Crawling
'@nuxtjs/robots',
// Icons
'nuxt-icon',
'nuxt-build-cache',
],

// Module Options
content: {
Expand Down Expand Up @@ -106,4 +118,4 @@ export default defineNuxtConfig({
},
},
},
})
})

0 comments on commit baea02d

Please sign in to comment.