dotnet-new csproj templates (#4382)
Make csproj templates first-class in dotnet-new.
This commit is contained in:
parent
1926d0e4a4
commit
02a19aff56
102 changed files with 3670 additions and 445 deletions
45
TestAssets/TestProjects/ProjectJsonWebTemplate/gulpfile.js
Normal file
45
TestAssets/TestProjects/ProjectJsonWebTemplate/gulpfile.js
Normal file
|
@ -0,0 +1,45 @@
|
|||
/// <binding Clean='clean' />
|
||||
"use strict";
|
||||
|
||||
var gulp = require("gulp"),
|
||||
rimraf = require("rimraf"),
|
||||
concat = require("gulp-concat"),
|
||||
cssmin = require("gulp-cssmin"),
|
||||
uglify = require("gulp-uglify");
|
||||
|
||||
var webroot = "./wwwroot/";
|
||||
|
||||
var paths = {
|
||||
js: webroot + "js/**/*.js",
|
||||
minJs: webroot + "js/**/*.min.js",
|
||||
css: webroot + "css/**/*.css",
|
||||
minCss: webroot + "css/**/*.min.css",
|
||||
concatJsDest: webroot + "js/site.min.js",
|
||||
concatCssDest: webroot + "css/site.min.css"
|
||||
};
|
||||
|
||||
gulp.task("clean:js", function (cb) {
|
||||
rimraf(paths.concatJsDest, cb);
|
||||
});
|
||||
|
||||
gulp.task("clean:css", function (cb) {
|
||||
rimraf(paths.concatCssDest, cb);
|
||||
});
|
||||
|
||||
gulp.task("clean", ["clean:js", "clean:css"]);
|
||||
|
||||
gulp.task("min:js", function () {
|
||||
return gulp.src([paths.js, "!" + paths.minJs], { base: "." })
|
||||
.pipe(concat(paths.concatJsDest))
|
||||
.pipe(uglify())
|
||||
.pipe(gulp.dest("."));
|
||||
});
|
||||
|
||||
gulp.task("min:css", function () {
|
||||
return gulp.src([paths.css, "!" + paths.minCss])
|
||||
.pipe(concat(paths.concatCssDest))
|
||||
.pipe(cssmin())
|
||||
.pipe(gulp.dest("."));
|
||||
});
|
||||
|
||||
gulp.task("min", ["min:js", "min:css"]);
|
Loading…
Add table
Add a link
Reference in a new issue