这是我的gulpfile.js
var gulp = require( "gulp" ),
traceur = require( "traceur" ),
babel = require( "babel" ),
plumber = require( "plumber" ),
es6Path = "es6/*.js",
compilePath = "es6/compiled";
gulp.task( "traceur", function () {
gulp.src( [ es6Path ] )
.pipe( plumber() )
.pipe( traceur( { blockBinding: true } ) )
.pipe( gulp.dest( compilePath + '/traceur' ) );
});
gulp.task( "babel", function () {
gulp.src( [ es6Path ] )
.pipe( plumber() )
.pipe( babel() )
.pipe( gulp.dest( compilePath + '/babel' ) );
});
gulp.task( "watch", function() {
gulp.watch( [ es6Path ], [ "traceur", "babel" ] );
});
gulp.task( "default", [ "traceur", "babel", "watch" ] );这是我的package.json文件。
{
"name": "ES6Demos",
"version": "1.0.0",
"description": "Getting started wtih ES6 using gulp",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Vinayak Phal",
"license": "ISC",
"devDependencies": {
"gulp": "^3.9.0",
"gulp-babel": "^5.2.1",
"gulp-concat": "^2.6.0",
"gulp-plumber": "^1.0.1",
"gulp-traceur": "^0.17.1",
"gulp-typescript": "^2.9.0",
"gulp-uglify": "^1.4.1"
}
}安装了所有的依赖项和所有内容,但我仍然得到以下错误。
这不仅与traceur有关,还会给其他模块带来错误。无论哪一种都是在吞咽的时候。

发布于 2015-09-25 12:41:05
你需要“追踪员”。你得要求“酒鬼”。其他包裹也是一样的。
https://stackoverflow.com/questions/32782406
复制相似问题