mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
fix(build): copy README (#4782)
This commit is contained in:
parent
31ca8e0560
commit
72d264de03
@ -4,13 +4,7 @@ import { copy } from 'fs-extra'
|
||||
import { series, parallel } from 'gulp'
|
||||
import { run } from './utils/process'
|
||||
import { withTaskName } from './utils/gulp'
|
||||
import {
|
||||
buildOutput,
|
||||
epOutput,
|
||||
epPackage,
|
||||
epRoot,
|
||||
projRoot,
|
||||
} from './utils/paths'
|
||||
import { buildOutput, epOutput, epPackage, projRoot } from './utils/paths'
|
||||
import { buildConfig } from './build-info'
|
||||
import type { TaskFunction } from 'gulp'
|
||||
import type { Module } from './build-info'
|
||||
@ -18,23 +12,18 @@ import type { Module } from './build-info'
|
||||
const runTask = (name: string) =>
|
||||
withTaskName(name, () => run(`pnpm run build ${name}`))
|
||||
|
||||
export const copyFiles = () => {
|
||||
const copyTypings = async () => {
|
||||
await copyFile(
|
||||
path.resolve(projRoot, 'typings/global.d.ts'),
|
||||
path.resolve(epOutput, 'global.d.ts')
|
||||
)
|
||||
}
|
||||
|
||||
return Promise.all([
|
||||
export const copyFiles = () =>
|
||||
Promise.all([
|
||||
copyFile(epPackage, path.join(epOutput, 'package.json')),
|
||||
copyFile(
|
||||
path.resolve(epRoot, 'README.md'),
|
||||
path.resolve(projRoot, 'README.md'),
|
||||
path.resolve(epOutput, 'README.md')
|
||||
),
|
||||
copyTypings(),
|
||||
copyFile(
|
||||
path.resolve(projRoot, 'typings/global.d.ts'),
|
||||
path.resolve(epOutput, 'global.d.ts')
|
||||
),
|
||||
])
|
||||
}
|
||||
|
||||
export const copyTypesDefinitions: TaskFunction = (done) => {
|
||||
const src = path.resolve(buildOutput, 'types')
|
||||
|
@ -7,10 +7,8 @@ pnpm update:version
|
||||
|
||||
pnpm build
|
||||
|
||||
find dist/element-plus/packages -type d -name node_modules -print0 | xargs -0 -I {} rm -rf {}
|
||||
|
||||
cd dist/element-plus
|
||||
npm publish --access public
|
||||
cd -
|
||||
|
||||
echo "Publish completed"
|
||||
echo "✅ Publish completed"
|
||||
|
Loading…
Reference in New Issue
Block a user