0.1.0 • Published 6 years ago

gulp-babel-script v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

fork from petergoes/gulp-babel-inline

gulp-babel-script能匹配<script></script> 这种标签 如果要严格匹配可以在options里面加上 scriptStrict

以下是常用配置:

gulp.task('handleHtml', function () {
  gulp
    .src(htmlSrc, {base:'./src'})
    .pipe(babelScript({
       presets: ['@babel/env'],
       // scriptStrict:true // 不匹配<script></script>,这个配置不会传到babel里面
    }))
    .pipe(gulp.dest(dist))
})