Skip to content

Commit f03d590

Browse files
committed
Merge pull request #8 from hdgarrood/master
Enable 'gulp test'
2 parents 62660c4 + 31e464a commit f03d590

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

gulpfile.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ var gulp = require("gulp");
44
var plumber = require("gulp-plumber");
55
var purescript = require("gulp-purescript");
66
var jsvalidate = require("gulp-jsvalidate");
7+
var run = require('gulp-run');
78

89
var paths = [
910
"src/**/*.purs",
@@ -45,4 +46,11 @@ gulp.task("dotpsci", function () {
4546
.pipe(purescript.dotPsci());
4647
});
4748

49+
gulp.task("test", function() {
50+
return gulp.src(paths.concat(['test/Main.purs']))
51+
.pipe(plumber())
52+
.pipe(purescript.psc({ main: "Test.Main" }))
53+
.pipe(run("node"));
54+
})
55+
4856
gulp.task("default", ["jsvalidate", "docs", "dotpsci"]);

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"gulp": "^3.8.11",
55
"gulp-jsvalidate": "^1.0.1",
66
"gulp-plumber": "^1.0.0",
7-
"gulp-purescript": "^0.3.1"
7+
"gulp-purescript": "^0.3.1",
8+
"gulp-run": "~1.6.7"
89
}
910
}

test/Main.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
module Main where
2+
module Test.Main where
33

44
import Console (log)
55
import Control.Monad.Eff

0 commit comments

Comments
 (0)