Gulp通天任务将无法完成

时间:2018-10-14 00:10:03

标签: javascript npm gulp babel

我正在尝试使用babel,任务将选择所有文件,但任务无法完成

gulp.task('js', function() {
  return gulp
    .src('src/js/**/*.js')
    .pipe(print())
    .pipe(babel())
    .pipe(gulp.dest('dist'))
})

.babelrc

{
  "presets": ["es2015"]
}

即使认为我也尝试预设流也不会工作。

这是我的package.json

{
  "name": "bundle-shell",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@babel/core": "^7.1.2",
    "@babel/preset-env": "^7.1.0",
    "@babel/preset-flow": "^7.0.0",
    "babel-core": "^6.26.3",
    "babel-preset-env": "^1.7.0",
    "babel-preset-es2015": "^6.24.1",
    "babelify": "^10.0.0",
    "browser-sync": "^2.26.0",
    "del": "^3.0.0",
    "gulp": "^3.9.1",
    "gulp-babel": "^8.0.0",
    "gulp-cache": "^1.0.2",
    "gulp-imagemin": "^4.1.0",
    "gulp-sass": "^4.0.1",
    "gulp-uglify": "^3.0.1",
    "gulp-useref": "^3.1.5",
    "run-sequence": "^2.2.1"
  },
  "dependencies": {
    "babel-polyfill": "^6.26.0",
    "browserify": "^16.2.3",
    "core-js": "^2.5.7",
    "gulp-cssnano": "^2.1.3",
    "gulp-print": "^5.0.0",
    "systemjs": "^2.0.2",
    "watchify": "^3.11.0"
  }
}

我确实已经安装了所有软件包

0 个答案:

没有答案