Get build system working

This commit is contained in:
mattx 2020-06-21 15:07:31 +02:00
parent de8c4eb60f
commit b647296f08
3 changed files with 35 additions and 0 deletions

2
.gitignore vendored
View File

@ -76,3 +76,5 @@ typings/
# FuseBox cache
.fusebox/
# Gulp build output
build/

31
gulpfile.js Normal file
View File

@ -0,0 +1,31 @@
var gulp = require("gulp");
var clean = require("gulp-clean");
var coffee = require("gulp-coffee");
// gulp-clean seems to not like exporting the function
gulp.task("clean", function(){
return gulp.src("./build", {read: false, allowEmpty: true})
.pipe(clean());
});
function server(cb){
gulp.src("./index.coffee")
.pipe(coffee({bare: true}))
.pipe(gulp.dest("./build"));
cb();
}
function client(cb){
gulp.src("./static/app.coffee")
.pipe(coffee({bare: true}))
.pipe(gulp.dest("./build/static"));
gulp.src("./static/index.html")
.pipe(gulp.dest("./build/static"));
cb();
}
exports.server = server;
exports.client = client;
exports.default = gulp.series("clean", gulp.parallel(server, client));

View File

@ -15,6 +15,8 @@
"devDependencies": {
"coffeescript": "^2.5.1",
"gulp": "^4.0.2",
"gulp-clean": "^0.4.0",
"gulp-coffee": "^3.0.3",
"stylus": "^0.54.7"
}
}