mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-03 03:38:41 +08:00
build: no strict when build (#3373)
This commit is contained in:
parent
0bcebf5e18
commit
f538abae77
@ -3,26 +3,30 @@ import ts from 'gulp-typescript'
|
||||
import path from 'path'
|
||||
import { buildOutput } from '../../build/paths'
|
||||
|
||||
import type { Settings } from 'gulp-typescript'
|
||||
|
||||
export const esm = './es'
|
||||
export const cjs = './lib'
|
||||
|
||||
const inputs = ['./**/*.ts', '!gulpfile.ts', '!./node_modules', '!./tests/*.ts']
|
||||
|
||||
function createProject(settings: Settings = {}) {
|
||||
return ts.createProject('tsconfig.json', {
|
||||
// temporarily disabled
|
||||
// TODO: remove this
|
||||
strict: false,
|
||||
...settings,
|
||||
})
|
||||
}
|
||||
|
||||
function compileEsm() {
|
||||
return gulp
|
||||
.src(inputs)
|
||||
.pipe(ts.createProject('tsconfig.json')())
|
||||
.pipe(gulp.dest(esm))
|
||||
return gulp.src(inputs).pipe(createProject()()).pipe(gulp.dest(esm))
|
||||
}
|
||||
|
||||
function compileCjs() {
|
||||
return gulp
|
||||
.src(inputs)
|
||||
.pipe(
|
||||
ts.createProject('tsconfig.json', {
|
||||
module: 'commonjs',
|
||||
})()
|
||||
)
|
||||
.pipe(createProject({ module: 'commonjs' })())
|
||||
.pipe(gulp.dest(cjs))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user