mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
Upgraded gulp to v4
This commit is contained in:
parent
22f2a1ae00
commit
8cb3022866
@ -57,21 +57,21 @@ gulp.task("clean", function (cb) {
|
||||
return rimraf("./wwwroot/*", cb);
|
||||
});
|
||||
|
||||
gulp.task('copy-assets', function () {
|
||||
gulp.task('copy-assets', function (done) {
|
||||
var streams = [];
|
||||
for (var asset in assets) {
|
||||
for (var item in assets[asset]) {
|
||||
streams.push(gulp.src(item).pipe(gulp.dest('./wwwroot/' + assets[asset][item])));
|
||||
}
|
||||
}
|
||||
done();
|
||||
});
|
||||
|
||||
gulp.task("load-bundle", function () {
|
||||
gulp.task("load-bundle", function (done) {
|
||||
bundleconfig = require("./bundleconfig.json");
|
||||
done();
|
||||
});
|
||||
|
||||
gulp.task("min", ["min:js", "min:css"]);
|
||||
|
||||
gulp.task("min:js", function () {
|
||||
var tasks = getBundles(".js").map(function (bundle) {
|
||||
return gulp.src(bundle.inputFiles, { base: "." })
|
||||
@ -92,6 +92,8 @@ gulp.task("min:css", function () {
|
||||
return merge(tasks);
|
||||
});
|
||||
|
||||
gulp.task("min", gulp.parallel("min:js", "min:css"));
|
||||
|
||||
gulp.task("update-version", function () {
|
||||
return gulp.src('./App_Data/version.template.json')
|
||||
.pipe(replace('{{git_ver}}', git.tag()))
|
||||
@ -100,7 +102,7 @@ gulp.task("update-version", function () {
|
||||
.pipe(gulp.dest('./App_Data'));
|
||||
});
|
||||
|
||||
gulp.task("watch", function () {
|
||||
gulp.task("watch", function (done) {
|
||||
// Watch Source Files
|
||||
assets.forEach(function (src) {
|
||||
for (var key in src) {
|
||||
@ -119,6 +121,8 @@ gulp.task("watch", function () {
|
||||
getBundles(".css").forEach(function (bundle) {
|
||||
gulp.watch(bundle.inputFiles, ["min:css"]);
|
||||
});
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
function getBundles(extension) {
|
||||
|
2640
IdentityServer/package-lock.json
generated
2640
IdentityServer/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@
|
||||
"devDependencies": {
|
||||
"del": "^3.0.0",
|
||||
"git-rev-sync": "^1.12.0",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-cssmin": "^0.2.0",
|
||||
"gulp-rename": "^1.3.0",
|
||||
|
@ -82,21 +82,21 @@ gulp.task("clean", function (cb) {
|
||||
return rimraf("./wwwroot/*", cb);
|
||||
});
|
||||
|
||||
gulp.task('copy-assets', function () {
|
||||
gulp.task('copy-assets', function (done) {
|
||||
var streams = [];
|
||||
for (var asset in assets) {
|
||||
for (var item in assets[asset]) {
|
||||
streams.push(gulp.src(item).pipe(gulp.dest('./wwwroot/' + assets[asset][item])));
|
||||
}
|
||||
}
|
||||
done();
|
||||
});
|
||||
|
||||
gulp.task("load-bundle", function () {
|
||||
gulp.task("load-bundle", function (done) {
|
||||
bundleconfig = require("./bundleconfig.json");
|
||||
done();
|
||||
});
|
||||
|
||||
gulp.task("min", ["min:js", "min:css"]);
|
||||
|
||||
gulp.task("min:js", function () {
|
||||
var tasks = getBundles(".js").map(function (bundle) {
|
||||
return gulp.src(bundle.inputFiles, { base: "." })
|
||||
@ -117,6 +117,8 @@ gulp.task("min:css", function () {
|
||||
return merge(tasks);
|
||||
});
|
||||
|
||||
gulp.task("min", gulp.parallel("min:js", "min:css"));
|
||||
|
||||
gulp.task("update-version", function () {
|
||||
return gulp.src('./App_Data/version.template.json')
|
||||
.pipe(replace('{{git_ver}}', git.tag()))
|
||||
@ -125,7 +127,7 @@ gulp.task("update-version", function () {
|
||||
.pipe(gulp.dest('./App_Data'));
|
||||
});
|
||||
|
||||
gulp.task("watch", function () {
|
||||
gulp.task("watch", function (done) {
|
||||
// Watch Source Files
|
||||
assets.forEach(function (src) {
|
||||
for (var key in src) {
|
||||
@ -144,6 +146,8 @@ gulp.task("watch", function () {
|
||||
getBundles(".css").forEach(function (bundle) {
|
||||
gulp.watch(bundle.inputFiles, ["min:css"]);
|
||||
});
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
function getBundles(extension) {
|
||||
|
3230
Teknik/package-lock.json
generated
3230
Teknik/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -29,7 +29,7 @@
|
||||
"eslint-plugin-react": "^7.14.3",
|
||||
"fancy-log": "^1.3.3",
|
||||
"git-rev-sync": "^1.12.0",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-cssmin": "^0.2.0",
|
||||
"gulp-eslint": "^5.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user