salix/gulpfile.js

21 lines
548 B
JavaScript
Raw Normal View History

2016-10-06 09:18:02 +00:00
var gulp = require ('gulp');
var concat = require ('gulp-concat');
2016-10-10 09:15:05 +00:00
var insert = require ('gulp-insert');
var babel = require ('gulp-babel');
2016-10-10 09:15:05 +00:00
var wrap = require("gulp-wrap");
var template = '"<%=file.path%>": <%=contents%>';
2016-10-06 09:18:02 +00:00
gulp.task ('default', function ()
{
2016-10-10 09:15:05 +00:00
var js = gulp.src ('./@salix/**/routes.js')
.pipe (wrap (template))
.pipe (concat ('salix.routes.js', {newLine: ','}))
.pipe (insert.prepend ('var routes = {'))
.pipe (insert.append ('};'))
.pipe (babel ({presets: ['es2015']}))
.pipe (gulp.dest ('./build/private'));
2016-10-06 09:18:02 +00:00
});