mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Gulp file code styling
This commit is contained in:
@@ -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" +
|
||||
|
||||
Reference in New Issue
Block a user