This commit is contained in:
2017-03-11 01:06:42 +01:00
parent d6f72ba20f
commit a2172da6ff
26 changed files with 183 additions and 72 deletions

View File

@ -6,7 +6,8 @@ var gulp = require("gulp"),
concat = require("gulp-concat"),
cssmin = require("gulp-cssmin"),
uglify = require("gulp-uglify"),
shell = require("gulp-shell");
shell = require("gulp-shell"),
rename = require('gulp-rename');
var webroot = "./wwwroot/";
@ -48,9 +49,22 @@ gulp.task("min:css", function () {
gulp.task("min", ["min:js", "min:css"]);
gulp.task('watch', shell.task(['ASPNET_ENV=Development dnx-watch web --configuration=Debug']))
gulp.task('build', shell.task(['dnu build --configuration=Debug']))
gulp.task('publish', shell.task(['dnu publish -o ../build']))
gulp.task('watch:web', shell.task(['ASPNET_ENV=Development dnx-watch web --configuration=Debug']));
gulp.task('watch:lua', shell.task(['ASPNET_ENV=Lua dnx-watch luatest --configuration=Debug']));
gulp.task('build', shell.task(['dnu build --configuration=Debug']));
gulp.task('publish', shell.task(['dnu publish']));
gulp.task("amincss", function () {
gulp.src([paths.css, "!" + paths.minCss, '!site.css'])
.pipe(cssmin())
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('wwwroot/css'));
});
gulp.task("aminjs", function () {
return gulp.src([paths.js, "!" + paths.minJs, '!site.js'])
.pipe(uglify())
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('wwwroot/js'));
});
gulp.task("default",['amincss','aminjs']);