-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor internall logic of scripts to allow adding more options
- Loading branch information
1 parent
09ca373
commit 158d1d4
Showing
32 changed files
with
428 additions
and
361 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,23 @@ | ||
import type { NuxtConfig } from '@nuxt/schema' | ||
import type { Dependency, Script } from '../utils/addPackageDependency' | ||
import prisma from './prisma' | ||
import auth from './auth' | ||
import trpc from './trpc' | ||
import type { Config, ModuleConfig } from '../types' | ||
import tailwind from './tailwind' | ||
import naiveui from './naiveui' | ||
import lint from './lint' | ||
|
||
export declare interface File { | ||
path: string | ||
content: string | ||
} | ||
import prisma from './prisma' | ||
import trpc from './trpc' | ||
import sidebaseAuth from './sidebase-auth' | ||
import eslint from './eslint' | ||
import githubActions from './github-actions' | ||
|
||
export declare interface PackageConfig { | ||
type: 'module' | 'template' | ||
humanReadableName: string | ||
description: string | ||
dependencies: Dependency[] | ||
scripts: Script[] | ||
nuxtConfig: NuxtConfig | ||
files: File[] | ||
tasksPostInstall: string[] | ||
indexVue?: { | ||
html: string | ||
css?: string | ||
js?: string | ||
} | ||
export type Modules = 'prisma' | 'sidebase-auth' | 'trpc' | 'tailwind' | 'naiveui' | ||
export const modules: Record<Modules, ModuleConfig> = { | ||
'tailwind': tailwind, | ||
'naiveui': naiveui, | ||
'prisma': prisma, | ||
'trpc': trpc, | ||
'sidebase-auth': sidebaseAuth | ||
} | ||
|
||
// Package options | ||
export type Packages = 'prisma' | 'auth' | 'trpc' | 'tailwind' | 'naiveui' | 'lint' | ||
export const packageConfigs: Record<Packages, PackageConfig> = { | ||
prisma, | ||
auth, | ||
trpc, | ||
tailwind, | ||
naiveui, | ||
lint | ||
export type Configs = 'eslint' | 'github-actions' | ||
export const configs: Record<Configs, Config> = { | ||
'eslint': eslint, | ||
'github-actions': githubActions | ||
} |
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
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
Oops, something went wrong.