Prechádzať zdrojové kódy

refactor(架构调整): build tools 移植整理。

gemercheung 2 rokov pred
rodič
commit
50b8a89683

+ 5 - 5
internal/build/src/tasks/helper.ts

@@ -12,7 +12,7 @@ import {
   epPackage,
   getPackageManifest,
   projRoot,
-} from '@element-plus/build-utils'
+} from '@kankan/build-utils'
 
 import type { TaskFunction } from 'gulp'
 import type {
@@ -88,10 +88,10 @@ const reAttribute: ReAttribute = (value, key) => {
   } else if (key === 'Subtags') {
     return str
       ? `el-${str
-          .replaceAll(/\s*\/\s*/g, '/el-')
-          .replaceAll(/\B([A-Z])/g, '-$1')
-          .replaceAll(/\s+/g, '-')
-          .toLowerCase()}`
+        .replaceAll(/\s*\/\s*/g, '/el-')
+        .replaceAll(/\B([A-Z])/g, '-$1')
+        .replaceAll(/\s+/g, '-')
+        .toLowerCase()}`
       : undefined
   } else {
     return str

+ 1 - 1
internal/build/src/tasks/modules.ts

@@ -6,7 +6,7 @@ import { nodeResolve } from '@rollup/plugin-node-resolve'
 import commonjs from '@rollup/plugin-commonjs'
 import esbuild from 'rollup-plugin-esbuild'
 import glob from 'fast-glob'
-import { epRoot, excludeFiles, pkgRoot } from '@element-plus/build-utils'
+import { epRoot, excludeFiles, pkgRoot } from '@kankan/build-utils'
 import { generateExternal, writeBundles } from '../utils'
 import { ElementPlusAlias } from '../plugins/element-plus-alias'
 import { buildConfigEntries, target } from '../build-info'

+ 1 - 1
internal/build/src/tasks/types-definitions.ts

@@ -12,7 +12,7 @@ import {
   excludeFiles,
   pkgRoot,
   projRoot,
-} from '@element-plus/build-utils'
+} from '@kankan/build-utils'
 import { pathRewriter } from '../utils'
 import type { CompilerOptions, SourceFile } from 'ts-morph'
 

+ 1 - 1
internal/build/src/utils/gulp.ts

@@ -1,4 +1,4 @@
-import { buildRoot } from '@element-plus/build-utils'
+import { buildRoot } from '@kankan/build-utils'
 import { run } from './process'
 
 import type { TaskFunction } from 'gulp'

+ 1 - 1
internal/build/src/utils/pkg.ts

@@ -1,4 +1,4 @@
-import { PKG_NAME, PKG_PREFIX } from '@element-plus/build-constants'
+import { PKG_NAME, PKG_PREFIX } from '@kankan/build-constants'
 import { buildConfig } from '../build-info'
 
 import type { Module } from '../build-info'

+ 1 - 1
internal/eslint-config/index.js

@@ -227,7 +227,7 @@ module.exports = defineConfig({
                         position: 'before',
                     },
                     {
-                        pattern: '@element-plus/**',
+                        pattern: '@kankan/**',
                         group: 'internal',
                     },
                 ],

+ 2 - 2
internal/metadata/src/contributor.ts

@@ -5,8 +5,8 @@ import { Octokit } from 'octokit'
 import consola from 'consola'
 import chalk from 'chalk'
 import { chunk, mapValues, uniqBy } from 'lodash-es'
-import { ensureDir, errorAndExit, projRoot, writeJson } from '@element-plus/build-utils'
-import { REPO_BRANCH, REPO_NAME, REPO_OWNER } from '@element-plus/build-constants'
+import { ensureDir, errorAndExit, projRoot, writeJson } from '@kankan/build-utils'
+import { REPO_BRANCH, REPO_NAME, REPO_OWNER } from '@kankan/build-constants'
 
 interface FetchOption {
     key: string