mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-03 11:47:48 +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 { series, parallel } from 'gulp'
|
||||||
import { run } from './utils/process'
|
import { run } from './utils/process'
|
||||||
import { withTaskName } from './utils/gulp'
|
import { withTaskName } from './utils/gulp'
|
||||||
import {
|
import { buildOutput, epOutput, epPackage, projRoot } from './utils/paths'
|
||||||
buildOutput,
|
|
||||||
epOutput,
|
|
||||||
epPackage,
|
|
||||||
epRoot,
|
|
||||||
projRoot,
|
|
||||||
} from './utils/paths'
|
|
||||||
import { buildConfig } from './build-info'
|
import { buildConfig } from './build-info'
|
||||||
import type { TaskFunction } from 'gulp'
|
import type { TaskFunction } from 'gulp'
|
||||||
import type { Module } from './build-info'
|
import type { Module } from './build-info'
|
||||||
@ -18,23 +12,18 @@ import type { Module } from './build-info'
|
|||||||
const runTask = (name: string) =>
|
const runTask = (name: string) =>
|
||||||
withTaskName(name, () => run(`pnpm run build ${name}`))
|
withTaskName(name, () => run(`pnpm run build ${name}`))
|
||||||
|
|
||||||
export const copyFiles = () => {
|
export const copyFiles = () =>
|
||||||
const copyTypings = async () => {
|
Promise.all([
|
||||||
await copyFile(
|
|
||||||
path.resolve(projRoot, 'typings/global.d.ts'),
|
|
||||||
path.resolve(epOutput, 'global.d.ts')
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
return Promise.all([
|
|
||||||
copyFile(epPackage, path.join(epOutput, 'package.json')),
|
copyFile(epPackage, path.join(epOutput, 'package.json')),
|
||||||
copyFile(
|
copyFile(
|
||||||
path.resolve(epRoot, 'README.md'),
|
path.resolve(projRoot, 'README.md'),
|
||||||
path.resolve(epOutput, '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) => {
|
export const copyTypesDefinitions: TaskFunction = (done) => {
|
||||||
const src = path.resolve(buildOutput, 'types')
|
const src = path.resolve(buildOutput, 'types')
|
||||||
|
@ -7,10 +7,8 @@ pnpm update:version
|
|||||||
|
|
||||||
pnpm build
|
pnpm build
|
||||||
|
|
||||||
find dist/element-plus/packages -type d -name node_modules -print0 | xargs -0 -I {} rm -rf {}
|
|
||||||
|
|
||||||
cd dist/element-plus
|
cd dist/element-plus
|
||||||
npm publish --access public
|
npm publish --access public
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
echo "Publish completed"
|
echo "✅ Publish completed"
|
||||||
|
Loading…
Reference in New Issue
Block a user