This commit is contained in:
易良 2021-01-08 09:36:49 +08:00 committed by GitHub
parent fd8ac0a582
commit dd141c3c06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -16,7 +16,7 @@ project
├─ babel.config.js # Babel 配置文件
├─ vant.config.js # Vant Cli 配置文件
├─ pacakge.json
├─ package.json
└─ README.md
```

View File

@ -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',

View File

@ -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;

View File

@ -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<void> {
genPackageEntry({
outputPath: PACKAGE_ENTRY_FILE,
});
genPacakgeStyle({
genPackageStyle({
outputPath: replaceExt(PACKAGE_STYLE_FILE, `.${CSS_LANG}`),
});
genSiteMobileShared();