Get build system working
This commit is contained in:
parent
de8c4eb60f
commit
b647296f08
|
@ -76,3 +76,5 @@ typings/
|
|||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# Gulp build output
|
||||
build/
|
||||
|
|
|
@ -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));
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue