diff --git a/cli/src/generate.ts b/cli/src/generate.ts index b48a6325..830b3ad2 100644 --- a/cli/src/generate.ts +++ b/cli/src/generate.ts @@ -1,3 +1,4 @@ +import type { File, ResolvedData } from './types.js' import fs from 'node:fs' import path from 'node:path' import process from 'node:process' @@ -6,7 +7,6 @@ import { DeployType, Mode } from './constants.js' import { createPackageJson } from './packageJson.js' import { createRender } from './render.js' import { getTemplate, readFiles, readJsonFile, writeFiles } from './utils/index.js' -import type { File, ResolvedData } from './types.js' export async function generate(mode: Mode, data: ResolvedData): Promise { const cwd = process.cwd() diff --git a/cli/src/locales/index.ts b/cli/src/locales/index.ts index 952b5551..133b7b48 100644 --- a/cli/src/locales/index.ts +++ b/cli/src/locales/index.ts @@ -1,6 +1,6 @@ +import type { Langs, Locale } from '../types.js' import { en } from './en.js' import { zh } from './zh.js' -import type { Langs, Locale } from '../types.js' export const locales: Record = { 'zh-CN': zh, diff --git a/cli/src/packageJson.ts b/cli/src/packageJson.ts index 95bae4a8..48f972dc 100644 --- a/cli/src/packageJson.ts +++ b/cli/src/packageJson.ts @@ -1,8 +1,8 @@ +import type { File, ResolvedData } from './types.js' import { kebabCase } from '@pengzhanbo/utils' import { execaCommand } from 'execa' import { Mode } from './constants.js' import { getDependenciesVersion, readJsonFile, resolve } from './utils/index.js' -import type { File, ResolvedData } from './types.js' export async function createPackageJson( mode: Mode, diff --git a/cli/src/prompt.ts b/cli/src/prompt.ts index ebca1587..da5a30cc 100644 --- a/cli/src/prompt.ts +++ b/cli/src/prompt.ts @@ -1,9 +1,9 @@ +import type { Bundler, Langs, Options, PromptResult } from './types.js' import { createRequire } from 'node:module' import process from 'node:process' import { cancel, confirm, group, select, text } from '@clack/prompts' import { bundlerOptions, deployOptions, DeployType, languageOptions, Mode } from './constants.js' import { setLang, t } from './translate.js' -import type { Bundler, Langs, Options, PromptResult } from './types.js' const require = createRequire(process.cwd()) diff --git a/cli/src/render.ts b/cli/src/render.ts index 04371fe2..66ef3961 100644 --- a/cli/src/render.ts +++ b/cli/src/render.ts @@ -1,6 +1,6 @@ +import type { ResolvedData } from './types.js' import { kebabCase } from '@pengzhanbo/utils' import handlebars from 'handlebars' -import type { ResolvedData } from './types.js' export interface RenderData extends ResolvedData { name: string diff --git a/cli/src/run.ts b/cli/src/run.ts index a31d1189..51225423 100644 --- a/cli/src/run.ts +++ b/cli/src/run.ts @@ -1,3 +1,4 @@ +import type { PromptResult, ResolvedData } from './types.js' import path from 'node:path' import process from 'node:process' import { intro, outro, spinner } from '@clack/prompts' @@ -8,7 +9,6 @@ import { generate } from './generate.js' import { prompt } from './prompt.js' import { t } from './translate.js' import { getPackageManager } from './utils/index.js' -import type { PromptResult, ResolvedData } from './types.js' export async function run(mode: Mode, root?: string) { intro(colors.cyan('Welcome to VuePress and vuepress-theme-plume !')) diff --git a/cli/src/translate.ts b/cli/src/translate.ts index 1feeac11..9fdf0aa4 100644 --- a/cli/src/translate.ts +++ b/cli/src/translate.ts @@ -1,5 +1,5 @@ -import { locales } from './locales/index.js' import type { Langs, Locale } from './types.js' +import { locales } from './locales/index.js' function createTranslate(lang?: Langs) { let current: Langs = lang || 'en-US' diff --git a/cli/src/utils/fs.ts b/cli/src/utils/fs.ts index b83c8db0..dd8d0dde 100644 --- a/cli/src/utils/fs.ts +++ b/cli/src/utils/fs.ts @@ -1,6 +1,6 @@ +import type { File } from '../types.js' import fs from 'node:fs/promises' import path from 'node:path' -import type { File } from '../types.js' export async function readFiles(root: string): Promise { const filepaths = await fs.readdir(root, { recursive: true }) diff --git a/cli/src/utils/getPackageManager.ts b/cli/src/utils/getPackageManager.ts index d9324771..6a7d566b 100644 --- a/cli/src/utils/getPackageManager.ts +++ b/cli/src/utils/getPackageManager.ts @@ -1,5 +1,5 @@ -import process from 'node:process' import type { PackageManager } from '../types.js' +import process from 'node:process' export function getPackageManager(): PackageManager { const name = process.env?.npm_config_user_agent || 'npm' diff --git a/docs/.vuepress/theme.ts b/docs/.vuepress/theme.ts index 94c7025b..66274a92 100644 --- a/docs/.vuepress/theme.ts +++ b/docs/.vuepress/theme.ts @@ -1,6 +1,6 @@ +import type { Theme } from 'vuepress' import process from 'node:process' import { plumeTheme } from 'vuepress-theme-plume' -import type { Theme } from 'vuepress' export const theme: Theme = plumeTheme({ hostname: process.env.SITE_HOST || 'https://plume.pengzhanbo.cn', diff --git a/docs/.vuepress/themes/components/CustomTintPlate.vue b/docs/.vuepress/themes/components/CustomTintPlate.vue index 919882e2..fbd10999 100644 --- a/docs/.vuepress/themes/components/CustomTintPlate.vue +++ b/docs/.vuepress/themes/components/CustomTintPlate.vue @@ -1,6 +1,6 @@ diff --git a/theme/src/client/components/Home/VPHomeFeature.vue b/theme/src/client/components/Home/VPHomeFeature.vue index fb1c7d6a..b69a0581 100644 --- a/theme/src/client/components/Home/VPHomeFeature.vue +++ b/theme/src/client/components/Home/VPHomeFeature.vue @@ -1,10 +1,10 @@