私はノードに慣れていないし、 "適切な"環境で開発しています。 mochaと他のいくつかのモジュールと一緒に私の現在のプロジェクトのためにgulpをインストールしました。ここに私のgulpfile.jsです:私は「一口」を実行すると"Finishing"の後でGulpがハングアップする
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var eslint = require('gulp-eslint');
gulp.task('lint', function() {
return gulp.src(['js/**/*.js'])
// eslint() attaches the lint output to the eslint property
// of the file object so it can be used by other modules.
.pipe(eslint())
// eslint.format() outputs the lint results to the console.
// Alternatively use eslint.formatEach() (see Docs).
.pipe(eslint.format())
// To have the process exit with an error code (1) on
// lint error, return the stream and pipe to failOnError last.
.pipe(eslint.failOnError());
});
gulp.task('test', function() {
return gulp.src('tests/test.js', {read: false})
// gulp-mocha needs filepaths so you can't have any plugins before it
.pipe(mocha({reporter: 'list'}));
});
gulp.task('default', ['lint','test'], function() {
// This will only run if the lint task is successful...
});
、すべてのタスクを完了するために見えますが、ハングアップします。コマンドプロンプトに戻るにはCtrl + Cキーを押す必要があります。どのようにしてそれを正しく仕上げるのですか?
、彼らがハングアップするのですか?私はここにあなたのコードをカットアンドペーストし、それを実行する問題はありません。何も掛からない。 – Louis
これは後でお試しいただきます。ありがとうございます。 – Ooberdan