mirror of
https://github.com/element-plus/element-plus.git
synced 2024-12-27 03:01:14 +08:00
16f069ebbe
* Revert "build!: simplify build & support native esm import (#3900)"
This reverts commit fb94222bb4
.
* remove module
* Fix linter
* Add @element-plus/icons as dependency
* update pnpm lock file
* temporary lock element-plus at 1.1.0-beta.20
55 lines
1.4 KiB
TypeScript
55 lines
1.4 KiB
TypeScript
import path from 'path'
|
|
import { series, parallel } from 'gulp'
|
|
import { copyStyle } from './style'
|
|
import { copyEntryTypes } from './entry-types'
|
|
import { run } from './utils/process'
|
|
import { withTaskName } from './utils/gulp'
|
|
import { epOutput, epPackage, projRoot } from './utils/paths'
|
|
import { copyFullStyle } from './full-bundle'
|
|
|
|
const runTask = (name: string) =>
|
|
withTaskName(name, () => run(`pnpm run build ${name}`))
|
|
|
|
export const copySourceCode = async () => {
|
|
await run(`cp -R packages ${epOutput}`)
|
|
await run(`cp ${epPackage} ${epOutput}/package.json`)
|
|
}
|
|
|
|
export const copyREADME = async () => {
|
|
await run(`cp README.md ${epOutput}`)
|
|
}
|
|
|
|
export const copyDefinitions = async () => {
|
|
const files = [path.resolve(projRoot, 'typings', 'global.d.ts')]
|
|
await run(`cp ${files.join(' ')} ${epOutput}`)
|
|
}
|
|
|
|
export default series(
|
|
withTaskName('clean', () => run('pnpm run clean')),
|
|
|
|
parallel(
|
|
runTask('buildComponent'),
|
|
runTask('buildStyle'),
|
|
runTask('buildFullBundle'),
|
|
runTask('buildHelper'),
|
|
withTaskName('buildEachPackages', () =>
|
|
run('pnpm run --filter ./packages --parallel --stream build')
|
|
)
|
|
),
|
|
|
|
parallel(
|
|
copyStyle(),
|
|
copyFullStyle,
|
|
copyEntryTypes,
|
|
copySourceCode,
|
|
copyREADME,
|
|
copyDefinitions
|
|
)
|
|
)
|
|
|
|
export * from './component'
|
|
export * from './style'
|
|
export * from './full-bundle'
|
|
export * from './entry-types'
|
|
export * from './helper'
|