Skip to content

Commit

Permalink
feat: 根据检视意见修改函数名字
Browse files Browse the repository at this point in the history
  • Loading branch information
rhlin committed May 11, 2024
1 parent c71b24f commit dc1ad0f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
5 changes: 2 additions & 3 deletions packages/design-core/scripts/localCdnFile/copyBundleDeps.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { configServerAddProxy } from '../vite-plugins/configureServerAddProxy'
import { viteStaticCopy } from 'vite-plugin-static-copy'
import {
getCdnPathNpmInfoForSingleFile,
analysisPackageNeedToInstallAndModifyFilesMergeToSameVersion,
getPackageNeedToInstallAndFilesUsingSameVersion,
dedupeCopyFiles,
copyfileToDynamicSrcMapper
} from './locateCdnNpmInfo'
Expand Down Expand Up @@ -51,8 +51,7 @@ export function copyBundleDeps(
const cdnFiles = extraBundleCdnLink(bundleFile, originCdnPrefix).map((url) =>
getCdnPathNpmInfoForSingleFile(url, originCdnPrefix, base, dir, false, bundleTempDir)
)
const { packages: packageNeedToInstall, files } =
analysisPackageNeedToInstallAndModifyFilesMergeToSameVersion(cdnFiles)
const { packages: packageNeedToInstall, files } = getPackageNeedToInstallAndFilesUsingSameVersion(cdnFiles)

const plugin = (isDev) => {
return [
Expand Down
4 changes: 2 additions & 2 deletions packages/design-core/scripts/localCdnFile/copyImportMap.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { viteStaticCopy } from 'vite-plugin-static-copy'
import {
analysisPackageNeedToInstallAndModifyFilesMergeToSameVersion,
getPackageNeedToInstallAndFilesUsingSameVersion,
copyfileToDynamicSrcMapper,
dedupeCopyFiles,
getCdnPathNpmInfoForPackage,
Expand Down Expand Up @@ -30,7 +30,7 @@ export const copyLocalImportMap = (
.filter((styleUrl) => styleUrl.startsWith(originCdnPrefix))
.map((url) => getCdnPathNpmInfoForSingleFile(url, originCdnPrefix, publicPath, dir, false), bundleTempDir)

const { packages: packageNeedToInstall, files } = analysisPackageNeedToInstallAndModifyFilesMergeToSameVersion(
const { packages: packageNeedToInstall, files } = getPackageNeedToInstallAndFilesUsingSameVersion(
importMapFiles.concat(styleFiles)
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'node:path'
import { readJsonSync } from 'fs-extra'
import {
analysisPackageNeedToInstallAndModifyFilesMergeToSameVersion,
getPackageNeedToInstallAndFilesUsingSameVersion,
copyfileToDynamicSrcMapper,
dedupeCopyFiles,
getCdnPathNpmInfoForPackage,
Expand Down Expand Up @@ -69,8 +69,7 @@ export function copyPreviewImportMap(
}
return getCdnPathNpmInfoForSingleFile(url, originCdnPrefix, base, dir, false, bundleTempDir)
})
const { packages: packageNeedToInstall, files } =
analysisPackageNeedToInstallAndModifyFilesMergeToSameVersion(cdnFiles)
const { packages: packageNeedToInstall, files } = getPackageNeedToInstallAndFilesUsingSameVersion(cdnFiles)
return [
...installPackageTemporary(packageNeedToInstall, bundleTempDir),
...viteStaticCopy({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export function dedupeCopyFiles(files) {
}, [])
}

export function analysisPackageNeedToInstallAndModifyFilesMergeToSameVersion(files) {
export function getPackageNeedToInstallAndFilesUsingSameVersion(files) {
const packageNeedToInstall = files
.filter((item) => !item.sourceExist)
.map(({ packageName, version, sourceExistExternal: exist }) => ({ packageName, version, exist }))
Expand Down

0 comments on commit dc1ad0f

Please sign in to comment.