Skip to content

Commit

Permalink
Merge pull request #1675 from XiaoMi/build/ts-dependencies
Browse files Browse the repository at this point in the history
build: ts
  • Loading branch information
solarjoker committed Apr 8, 2021
2 parents de2a17a + 5a37f77 commit 7f40d89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ const compile = (modules) => {
.pipe(gulp.dest(modules === false ? esDir : libDir))

const js = gulp
.src(['components/**/*.@(js|jsx|ts|tsx)'])
.src(['components/**/*.@(js|jsx)'])
.pipe(
babel({
presets: ['@babel/preset-env', '@babel/preset-react', '@babel/preset-typescript'],
presets: ['@babel/preset-env', '@babel/preset-react'],
plugins: [['transform-remove-console', { exclude: ['error', 'warn'] }]]
})
)
Expand All @@ -65,7 +65,6 @@ const compile = (modules) => {
.pipe(gulp.dest(modules === false ? esDir : libDir))

const json = gulp.src(['components/**/*.@(json)']).pipe(gulp.dest(modules === false ? esDir : libDir))

const dtsByfile = gulp.src(['components/**/*.@(d.ts)']).pipe(gulp.dest(modules === false ? esDir : libDir))
const tsResult = gulp.src(['components/hi-request/*.@(ts)']).pipe(
tsperset({
Expand Down Expand Up @@ -96,6 +95,7 @@ const compile = (modules) => {
const hiRequestesDir = path.join(cwd, 'es', 'hi-request')
const dts = tsResult.dts.pipe(gulp.dest(modules === false ? hiRequestesDir : hiRequestlibDir))
const ts2js = tsResult.js.pipe(gulp.dest(modules === false ? hiRequestesDir : hiRequestlibDir))

return merge2([sass, assets, js, json, dtsByfile, dts, ts2js])
}

Expand Down

0 comments on commit 7f40d89

Please sign in to comment.