Skip to content

Commit ca70a5c

Browse files
BenedekFarkasHermesSbicego-LaserAgostiniAlessandro
authored
#8525: Upgrading client-side libraries (#8848)
Co-authored-by: HermesSbicego-Laser <hermes.sbicego@laser-group.com> Co-authored-by: Alessandro Agostini <alessandro.agostini@laser-group.com>
1 parent d4a36a8 commit ca70a5c

File tree

1,574 files changed

+149153
-140428
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,574 files changed

+149153
-140428
lines changed

src/Gulpfile.js

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
var fs = require("fs"),
2-
glob = require("glob"),
1+
var glob = require("glob"),
32
path = require("path-posix"),
43
merge = require("merge-stream"),
54
gulp = require("gulp"),
65
gulpif = require("gulp-if"),
7-
print = require("gulp-print"),
8-
debug = require("gulp-debug"),
96
newer = require("gulp-newer"),
107
plumber = require("gulp-plumber"),
118
sourcemaps = require("gulp-sourcemaps"),
@@ -63,7 +60,7 @@ gulp.task("watch", function () {
6360
else
6461
console.log("Asset file '" + event.path + "' was " + event.type + ", rebuilding asset group.");
6562
var doRebuild = true;
66-
var task = createAssetGroupTask(assetGroup, doRebuild);
63+
createAssetGroupTask(assetGroup, doRebuild);
6764
});
6865
}
6966
createWatcher();
@@ -150,7 +147,8 @@ function buildCssPipeline(assetGroup, doConcat, doRebuild) {
150147
newer({
151148
dest: doConcat ? assetGroup.outputPath : assetGroup.outputDir,
152149
ext: doConcat ? null : ".css",
153-
extra: assetGroup.manifestPath // Force a rebuild of this asset group is the asset manifest file itself is newer than the output(s).
150+
// Force a rebuild of this asset group is the asset manifest file itself is newer than the output(s).
151+
extra: assetGroup.manifestPath
154152
})
155153
))
156154
.pipe(plumber())
@@ -184,7 +182,8 @@ function buildCssPipeline(assetGroup, doConcat, doRebuild) {
184182
newer({
185183
dest: doConcat ? assetGroup.outputPath : assetGroup.outputDir,
186184
ext: doConcat ? null : ".css",
187-
extra: assetGroup.manifestPath // Force a rebuild of this asset group is the asset manifest file itself is newer than the output(s).
185+
// Force a rebuild of this asset group is the asset manifest file itself is newer than the output(s).
186+
extra: assetGroup.manifestPath
188187
})
189188
))
190189
.pipe(plumber())
@@ -197,11 +196,7 @@ function buildCssPipeline(assetGroup, doConcat, doRebuild) {
197196
.pipe(postcss([
198197
autoprefixer({ browsers: ["last 2 versions"] })
199198
]))
200-
.pipe(header(
201-
"/*\n" +
202-
"** NOTE: This file is generated by Gulp and should not be edited directly!\n" +
203-
"** Any changes made directly to this file will be overwritten next time its asset group is processed by Gulp.\n" +
204-
"*/\n\n"))
199+
.pipe(header(getOutputFileHeader()))
205200
.pipe(gulpif(generateSourceMaps, sourcemaps.write()))
206201
.pipe(eol())
207202
.pipe(rename(function (path) {
@@ -224,25 +219,23 @@ function buildJsPipeline(assetGroup, doConcat, doRebuild) {
224219
generateSourceMaps = false;
225220
var typeScriptOptions = { allowJs: true, noImplicitAny: true, noEmitOnError: true, module: 'amd' };
226221
if (assetGroup.typeScriptOptions)
227-
typeScriptOptions = Object.assign(typeScriptOptions, assetGroup.typeScriptOptions); // Merge override options from asset group if any.
222+
// Merge override options from asset group if any.
223+
typeScriptOptions = Object.assign(typeScriptOptions, assetGroup.typeScriptOptions);
228224
if (doConcat)
229225
typeScriptOptions.outFile = assetGroup.outputFileName;
230226
return gulp.src(assetGroup.inputPaths)
231227
.pipe(gulpif(!doRebuild,
232228
newer({
233229
dest: doConcat ? assetGroup.outputPath : assetGroup.outputDir,
234230
ext: doConcat ? null : ".js",
235-
extra: assetGroup.manifestPath // Force a rebuild of this asset group is the asset manifest file itself is newer than the output(s).
231+
// Force a rebuild of this asset group is the asset manifest file itself is newer than the output(s).
232+
extra: assetGroup.manifestPath
236233
})
237234
))
238235
.pipe(plumber())
239236
.pipe(gulpif(generateSourceMaps, sourcemaps.init()))
240-
.pipe(typescript(typeScriptOptions))
241-
.pipe(header(
242-
"/*\n" +
243-
"** NOTE: This file is generated by Gulp and should not be edited directly!\n" +
244-
"** Any changes made directly to this file will be overwritten next time its asset group is processed by Gulp.\n" +
245-
"*/\n\n"))
237+
.pipe(typescript(typeScriptOptions)) // TypeScript doesn't support JavaScript modules.
238+
.pipe(header(getOutputFileHeader()))
246239
.pipe(gulpif(generateSourceMaps, sourcemaps.write()))
247240
.pipe(eol())
248241
.pipe(rename(function (path) {
@@ -260,3 +253,12 @@ function buildJsPipeline(assetGroup, doConcat, doRebuild) {
260253
}))
261254
.pipe(gulp.dest(assetGroup.outputDir));
262255
}
256+
257+
function getOutputFileHeader() {
258+
return (
259+
"/*\n" +
260+
"** NOTE: This file is generated by Gulp and should not be edited directly!\n" +
261+
"** Any changes made directly to this file will be overwritten next time its asset group is processed by Gulp.\n" +
262+
"*/\n\n"
263+
);
264+
}

0 commit comments

Comments
 (0)