-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgulpfile.js
43 lines (34 loc) · 902 Bytes
/
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
36
37
38
39
40
41
42
43
'use strict'
var gulp = require('gulp');
var purescript = require('gulp-purescript');
var source = require('vinyl-source-stream');
var del = require('del');
var sources =
[ 'src/**/*.purs'
, 'bower_components/purescript-*/src/**/*.purs'
];
var foreigns =
[ 'src/**/*.js'
, 'bower_components/purescript-*/src/**/*.js'
];
gulp.task('make', function() {
return purescript.psc({ src: sources, ffi: foreigns });
});
gulp.task('bundle', ['make'], function() {
return purescript.pscBundle({src: "output/**/*.js", module: "Main", main: "Main", output: "app.js"})
});
gulp.task("clean-output", function () {
return del([
"dist",
"output",
".psci_modules",
".psci"
]);
});
gulp.task("clean-bundle", function() {
return del([
"app.js*"
])
});
gulp.task("clean", ["clean-output", "clean-bundle"]);
gulp.task('default', ['make', 'bundle']);