]>
git.immae.eu Git - github/fretlink/purs-loader.git/blob - gulpfile.js
3 var path
= require('path');
5 var gulp
= require('gulp');
7 var gutil
= require('gulp-util');
9 var plumber
= require('gulp-plumber');
11 var purescript
= require('gulp-purescript');
13 var sequence
= require('run-sequence');
15 var del
= require('del');
17 var config
= { del: ['build', 'index.js']
18 , purescript: { src: [ 'bower_components/purescript-*/src/**/*.purs*'
28 gutil
.log(gutil
.colors
.magenta('>>>> Error <<<<') + '\n' + e
.toString().trim());
32 gulp
.task('del', function(cb
){
36 gulp
.task('make', function(){
37 return gulp
.src(config
.purescript
.src
).
39 pipe(purescript
.pscMake({output: config
.purescript
.dest
})).
43 gulp
.task('psci', function(){
44 return gulp
.src(config
.purescript
.src
).
46 pipe(purescript
.dotPsci()).
50 gulp
.task('docs', function(){
51 return gulp
.src(config
.purescript
.src
[1]).
53 pipe(purescript
.pscDocs()).
55 pipe(gulp
.dest(config
.purescript
.docs
));
58 gulp
.task('watch', function(){
59 gulp
.watch(config
.purescript
.src
, ['make']);
62 gulp
.task('default', function(callback
){
63 sequence('del', 'make', ['psci', 'docs'], callback
);
66 gulp
.task('build', function(callback
){
67 sequence('del', 'make', callback
);