From dd141c3c0657881a2281fddd3c7f33c685e623ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=93=E8=89=AF?= <1204183885@qq.com> Date: Fri, 8 Jan 2021 09:36:49 +0800 Subject: [PATCH] fix: typo (#7868) --- packages/vant-cli/docs/directory.md | 2 +- packages/vant-cli/src/commands/build.ts | 8 ++++---- packages/vant-cli/src/compiler/gen-package-style.ts | 2 +- packages/vant-cli/src/compiler/vant-cli-site-plugin.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/vant-cli/docs/directory.md b/packages/vant-cli/docs/directory.md index 66405fe55..64f080aca 100644 --- a/packages/vant-cli/docs/directory.md +++ b/packages/vant-cli/docs/directory.md @@ -16,7 +16,7 @@ project │ ├─ babel.config.js # Babel 配置文件 ├─ vant.config.js # Vant Cli 配置文件 -├─ pacakge.json +├─ package.json └─ README.md ``` diff --git a/packages/vant-cli/src/commands/build.ts b/packages/vant-cli/src/commands/build.ts index 0ae6da73b..42822fa3b 100644 --- a/packages/vant-cli/src/commands/build.ts +++ b/packages/vant-cli/src/commands/build.ts @@ -13,7 +13,7 @@ import { genPackageEntry } from '../compiler/gen-package-entry'; import { genStyleDepsMap } from '../compiler/gen-style-deps-map'; import { genComponentStyle } from '../compiler/gen-component-style'; import { SRC_DIR, LIB_DIR, ES_DIR } from '../common/constant'; -import { genPacakgeStyle } from '../compiler/gen-package-style'; +import { genPackageStyle } from '../compiler/gen-package-style'; import { genVeturConfig } from '../compiler/gen-vetur-config'; import { isDir, @@ -82,7 +82,7 @@ async function buildStyleEntry() { genComponentStyle(); } -async function buildPacakgeEntry() { +async function buildPackageEntry() { const esEntryFile = join(ES_DIR, 'index.js'); const libEntryFile = join(LIB_DIR, 'index.js'); const styleEntryFile = join(LIB_DIR, `index.${CSS_LANG}`); @@ -95,7 +95,7 @@ async function buildPacakgeEntry() { setModuleEnv('esmodule'); await compileJs(esEntryFile); - genPacakgeStyle({ + genPackageStyle({ outputPath: styleEntryFile, pathResolver: (path: string) => path.replace(SRC_DIR, '.'), }); @@ -128,7 +128,7 @@ const tasks = [ }, { text: 'Build Package Entry', - task: buildPacakgeEntry, + task: buildPackageEntry, }, { text: 'Build Packed Outputs', diff --git a/packages/vant-cli/src/compiler/gen-package-style.ts b/packages/vant-cli/src/compiler/gen-package-style.ts index 57dde26bb..5bde59a5f 100644 --- a/packages/vant-cli/src/compiler/gen-package-style.ts +++ b/packages/vant-cli/src/compiler/gen-package-style.ts @@ -9,7 +9,7 @@ type Options = { pathResolver?: (path: string) => string; }; -export function genPacakgeStyle(options: Options) { +export function genPackageStyle(options: Options) { const styleDepsJson = require(STYPE_DEPS_JSON_FILE); const ext = '.' + CSS_LANG; diff --git a/packages/vant-cli/src/compiler/vant-cli-site-plugin.ts b/packages/vant-cli/src/compiler/vant-cli-site-plugin.ts index 3fcc999c4..e8b21ccef 100644 --- a/packages/vant-cli/src/compiler/vant-cli-site-plugin.ts +++ b/packages/vant-cli/src/compiler/vant-cli-site-plugin.ts @@ -2,7 +2,7 @@ import { Compiler } from 'webpack'; import { replaceExt } from '../common'; import { CSS_LANG } from '../common/css'; import { genPackageEntry } from './gen-package-entry'; -import { genPacakgeStyle } from './gen-package-style'; +import { genPackageStyle } from './gen-package-style'; import { genSiteMobileShared } from './gen-site-mobile-shared'; import { genSiteDesktopShared } from './gen-site-desktop-shared'; import { genStyleDepsMap } from './gen-style-deps-map'; @@ -17,7 +17,7 @@ export async function genSiteEntry(): Promise { genPackageEntry({ outputPath: PACKAGE_ENTRY_FILE, }); - genPacakgeStyle({ + genPackageStyle({ outputPath: replaceExt(PACKAGE_STYLE_FILE, `.${CSS_LANG}`), }); genSiteMobileShared();