Gulp file code styling

This commit is contained in:
Benedek Farkas
2025-09-30 21:08:18 +02:00
parent fe7854d0c0
commit 330d9e563a

View File

@@ -150,7 +150,8 @@ function buildCssPipeline(assetGroup, doConcat, doRebuild) {
newer({
dest: doConcat ? assetGroup.outputPath : assetGroup.outputDir,
ext: doConcat ? null : ".css",
extra: assetGroup.manifestPath // Force a rebuild of this asset group is the asset manifest file itself is newer than the output(s).
// Force a rebuild of this asset group is the asset manifest file itself is newer than the output(s).
extra: assetGroup.manifestPath
})
))
.pipe(plumber())
@@ -184,7 +185,8 @@ function buildCssPipeline(assetGroup, doConcat, doRebuild) {
newer({
dest: doConcat ? assetGroup.outputPath : assetGroup.outputDir,
ext: doConcat ? null : ".css",
extra: assetGroup.manifestPath // Force a rebuild of this asset group is the asset manifest file itself is newer than the output(s).
// Force a rebuild of this asset group is the asset manifest file itself is newer than the output(s).
extra: assetGroup.manifestPath
})
))
.pipe(plumber())
@@ -224,20 +226,22 @@ function buildJsPipeline(assetGroup, doConcat, doRebuild) {
generateSourceMaps = false;
var typeScriptOptions = { allowJs: true, noImplicitAny: true, noEmitOnError: true, module: 'amd' };
if (assetGroup.typeScriptOptions)
typeScriptOptions = Object.assign(typeScriptOptions, assetGroup.typeScriptOptions); // Merge override options from asset group if any.
if (doConcat)
// Merge override options from asset group if any.
typeScriptOptions = Object.assign(typeScriptOptions, assetGroup.typeScriptOptions);
if (doConcat)
typeScriptOptions.outFile = assetGroup.outputFileName;
return gulp.src(assetGroup.inputPaths)
.pipe(gulpif(!doRebuild,
newer({
dest: doConcat ? assetGroup.outputPath : assetGroup.outputDir,
ext: doConcat ? null : ".js",
extra: assetGroup.manifestPath // Force a rebuild of this asset group is the asset manifest file itself is newer than the output(s).
// Force a rebuild of this asset group is the asset manifest file itself is newer than the output(s).
extra: assetGroup.manifestPath
})
))
.pipe(plumber())
.pipe(gulpif(generateSourceMaps, sourcemaps.init()))
.pipe(typescript(typeScriptOptions)) // typescript does not support javascript modules
.pipe(typescript(typeScriptOptions)) // TypeScript doesn't support JavaScript modules.
.pipe(header(
"/*\n" +
"** NOTE: This file is generated by Gulp and should not be edited directly!\n" +