refactor(build)!: upgrade Gulpfile to ESM
This commit is contained in:
parent
f949bded9b
commit
b86f933171
@ -1,15 +1,15 @@
|
|||||||
const fs = require("fs");
|
import fs from "fs";
|
||||||
const gulp = require("gulp");
|
import gulp from "gulp";
|
||||||
const cleanCSS = require("gulp-clean-css");
|
import cleanCSS from "gulp-clean-css";
|
||||||
const named = require("vinyl-named");
|
import noop from "gulp-noop";
|
||||||
const noop = require("gulp-noop");
|
import rename from "gulp-rename";
|
||||||
const path = require("path");
|
import gulpSass from "gulp-sass";
|
||||||
const rename = require("gulp-rename");
|
import * as nodeSass from "sass";
|
||||||
const sass = require('gulp-sass')(require("sass"));
|
const sass = gulpSass(nodeSass);
|
||||||
const sourcemaps = require("gulp-sourcemaps");
|
import sourcemaps from "gulp-sourcemaps";
|
||||||
const ts = require("gulp-typescript");
|
import ts from "gulp-typescript";
|
||||||
const terser = require("gulp-terser");
|
import terser from "gulp-terser";
|
||||||
const webpack = require("webpack-stream");
|
import webpack from "webpack-stream";
|
||||||
|
|
||||||
const srcDir = "src";
|
const srcDir = "src";
|
||||||
const destDir = "OliverBooth/wwwroot";
|
const destDir = "OliverBooth/wwwroot";
|
||||||
@ -66,8 +66,7 @@ function copyImages() {
|
|||||||
.pipe(gulp.dest(`${destDir}/img`));
|
.pipe(gulp.dest(`${destDir}/img`));
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.assets = copyImages;
|
gulp.task("assets", copyImages);
|
||||||
exports.styles = gulp.parallel(compileSCSS, copyCSS);
|
gulp.task("styles", gulp.parallel(compileSCSS, copyCSS));
|
||||||
exports.scripts = gulp.parallel(copyJS, gulp.series(compileTS, bundleJS));
|
gulp.task("scripts", gulp.parallel(copyJS, gulp.series(compileTS, bundleJS)));
|
||||||
|
gulp.task("default", gulp.parallel("styles", "scripts", "assets"));
|
||||||
exports.default = gulp.parallel(exports.styles, exports.scripts, exports.assets);
|
|
@ -6,11 +6,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
|||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
README.md = README.md
|
README.md = README.md
|
||||||
package.json = package.json
|
package.json = package.json
|
||||||
Gulpfile.js = Gulpfile.js
|
|
||||||
tsconfig.json = tsconfig.json
|
tsconfig.json = tsconfig.json
|
||||||
.dockerignore = .dockerignore
|
.dockerignore = .dockerignore
|
||||||
docker-compose.yml = docker-compose.yml
|
docker-compose.yml = docker-compose.yml
|
||||||
global.json = global.json
|
global.json = global.json
|
||||||
|
Gulpfile.mjs = Gulpfile.mjs
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
|
13
package-lock.json
generated
13
package-lock.json
generated
@ -26,7 +26,6 @@
|
|||||||
"gulp-typescript": "^6.0.0-alpha.1",
|
"gulp-typescript": "^6.0.0-alpha.1",
|
||||||
"sass": "^1.69.5",
|
"sass": "^1.69.5",
|
||||||
"terser": "^5.19.2",
|
"terser": "^5.19.2",
|
||||||
"vinyl-named": "^1.1.0",
|
|
||||||
"webpack-stream": "^7.0.0"
|
"webpack-stream": "^7.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -5290,18 +5289,6 @@
|
|||||||
"xtend": "~4.0.1"
|
"xtend": "~4.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vinyl-named": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/vinyl-named/-/vinyl-named-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-ElYBnsSw8Y1Hz11WPw0DFmi+TBNTEBhZ9zXaHluDSIZZnkFIGCjGRBpsW5QmbMMLwv+lRpUD3VbKdJCbNpct7Q==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"through": "^2.3.6"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.10.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/vinyl-sourcemap": {
|
"node_modules/vinyl-sourcemap": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz",
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
"gulp-typescript": "^6.0.0-alpha.1",
|
"gulp-typescript": "^6.0.0-alpha.1",
|
||||||
"sass": "^1.69.5",
|
"sass": "^1.69.5",
|
||||||
"terser": "^5.19.2",
|
"terser": "^5.19.2",
|
||||||
"vinyl-named": "^1.1.0",
|
|
||||||
"webpack-stream": "^7.0.0"
|
"webpack-stream": "^7.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
Loading…
Reference in New Issue
Block a user