forked from sequelize/cli
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
35 lines (31 loc) · 1.02 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"use strict";
var gulp = require("gulp");
var jshint = require("gulp-jshint");
var mocha = require("gulp-mocha");
var path = require("path");
var args = require("yargs").argv;
gulp.task("default", ["lint", "test"], function () {});
gulp.task("lint", function () {
gulp
.src([
path.resolve(__dirname, "gulpfile.js"),
path.resolve(__dirname, "bin", "sequelize"),
path.resolve(__dirname, "lib", "**", "*.js"),
"!" + path.resolve(__dirname, "lib", "assets", "**", "*.js"),
path.resolve(__dirname, "test", "**", "*.js"),
"!" + path.resolve(__dirname, "test", "support", "tmp", "**", "*")
])
.pipe(jshint())
.pipe(jshint.reporter(require("jshint-stylish")))
.pipe(jshint.reporter(require("gulp-jshint-instafail")));
});
gulp.task("test", function () {
gulp
.src(path.resolve(__dirname, "test", "**", "*.test.js"), { read: false })
.pipe(mocha({
reporter: "spec",
ignoreLeaks: true,
timeout: 10000,
grep: args.grep
}));
});