@@ -0,0 +1,52 @@
3+var gulp = require('gulp')
4+ , run = require('gulp-run')
5+ , purescript = require('gulp-purescript')
11+ docSrc: ['src/**/*.purs', '!src/**/Internal/**/*.purs' ],
12+ bowerSrc: 'bower_components/purescript-*/src/**/*.purs',
14+ example: 'examples/*.purs',
15+ test: 'test/**/*.purs'
18+gulp.task('make', function() {
19+ return gulp.src([paths.src].concat(paths.bowerSrc))
20+ .pipe(purescript.pscMake({}))
21+ .pipe(gulp.dest(paths.dest));
24+gulp.task('test-make', function() {
25+ return gulp.src([paths.src, paths.test].concat(paths.bowerSrc))
26+ .pipe(purescript.pscMake({}))
27+ .pipe(gulp.dest(paths.dest));
30+gulp.task('test', ['test-make'], function() {
32+ for (var e in process.env) env[e] = process.env[e];
33+ env.NODE_PATH = 'output';
34+ run('node -e "require(\'Test.Main\').main();"', { 'env': env }).exec();
37+gulp.task('docs', function() {
38+ return gulp.src(paths.docSrc)
39+ .pipe(purescript.pscDocs())
40+ .pipe(gulp.dest(paths.doc));
43+gulp.task('psci', function() {
44+ return gulp.src([paths.src, paths.test, paths.example].concat(paths.bowerSrc))
45+ .pipe(purescript.dotPsci());
48+gulp.task('watch', function() {
49+ gulp.watch(paths.src, ['make', 'docs']);
52+gulp.task('default', ['make', 'docs']);