@yamato-daiwa/automation 0.0.0 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/EntryPoint.js +306 -207
- package/README.md +183 -0
- package/package.json +23 -14
package/EntryPoint.js
CHANGED
|
@@ -289,6 +289,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
289
289
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
290
290
|
const AssetsProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative */ "./ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative.ts"));
|
|
291
291
|
class AudiosProcessingSettingsRepresentative extends AssetsProcessingSettingsRepresentative_1.default {
|
|
292
|
+
TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM = "Audio";
|
|
293
|
+
TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = "Audios";
|
|
292
294
|
assetsProcessingCommonSettings;
|
|
293
295
|
actualAssetsGroupsSettings;
|
|
294
296
|
constructor(audiosManagementSettings, masterConfigRepresentative) {
|
|
@@ -344,6 +346,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
344
346
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
345
347
|
};
|
|
346
348
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
349
|
+
const AudiosProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @AudiosProcessing/AudiosProcessingSettingsRepresentative */ "./ProjectBuilding/AssetsProcessing/Audios/AudiosProcessingSettingsRepresentative.ts"));
|
|
347
350
|
/* --- Tasks executors ---------------------------------------------------------------------------------------------- */
|
|
348
351
|
const GulpStreamsBasedAssetsProcessor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor.ts"));
|
|
349
352
|
/* --- Applied utils ------------------------------------------------------------------------------------------------ */
|
|
@@ -393,7 +396,7 @@ class AudiosProcessor extends GulpStreamsBasedAssetsProcessor_1.default {
|
|
|
393
396
|
/* [ Theory ] The value of 'path' could change during file processing. */
|
|
394
397
|
fileInInitialState.sourceAbsolutePath = fileInInitialState.path;
|
|
395
398
|
fileInInitialState.outputDirectoryAbsolutePath =
|
|
396
|
-
|
|
399
|
+
AudiosProcessingSettingsRepresentative_1.default.computeActualOutputDirectoryAbsolutePathForTargetSourceFile({
|
|
397
400
|
targetSourceFileAbsolutePath: fileInInitialState.path,
|
|
398
401
|
respectiveAssetsGroupNormalizedSettings: normalizedAudiosGroupSettingsActualForCurrentFile
|
|
399
402
|
});
|
|
@@ -494,6 +497,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
494
497
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
495
498
|
const AssetsProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative */ "./ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative.ts"));
|
|
496
499
|
class FontsProcessingSettingsRepresentative extends AssetsProcessingSettingsRepresentative_1.default {
|
|
500
|
+
TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = "Fonts";
|
|
497
501
|
assetsProcessingCommonSettings;
|
|
498
502
|
actualAssetsGroupsSettings;
|
|
499
503
|
constructor(imagesManagementSettings, masterConfigRepresentative) {
|
|
@@ -549,6 +553,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
549
553
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
550
554
|
};
|
|
551
555
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
556
|
+
const FontsProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @FontsProcessing/FontsProcessingSettingsRepresentative */ "./ProjectBuilding/AssetsProcessing/Fonts/FontsProcessingSettingsRepresentative.ts"));
|
|
552
557
|
/* --- Tasks executor ----------------------------------------------------------------------------------------------- */
|
|
553
558
|
const GulpStreamsBasedAssetsProcessor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor.ts"));
|
|
554
559
|
/* --- Applied utils ------------------------------------------------------------------------------------------------ */
|
|
@@ -597,7 +602,7 @@ class FontsProcessor extends GulpStreamsBasedAssetsProcessor_1.default {
|
|
|
597
602
|
fileInInitialState.processingSettings = normalizedFontsGroupSettingsActualForCurrentFile;
|
|
598
603
|
/* [ Theory ] The value of 'path' could change during file processing. */
|
|
599
604
|
fileInInitialState.sourceAbsolutePath = fileInInitialState.path;
|
|
600
|
-
fileInInitialState.outputDirectoryAbsolutePath =
|
|
605
|
+
fileInInitialState.outputDirectoryAbsolutePath = FontsProcessingSettingsRepresentative_1.default.
|
|
601
606
|
computeActualOutputDirectoryAbsolutePathForTargetSourceFile({
|
|
602
607
|
targetSourceFileAbsolutePath: fileInInitialState.path,
|
|
603
608
|
respectiveAssetsGroupNormalizedSettings: normalizedFontsGroupSettingsActualForCurrentFile
|
|
@@ -698,6 +703,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
698
703
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
699
704
|
const AssetsProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative */ "./ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative.ts"));
|
|
700
705
|
class ImagesProcessingSettingsRepresentative extends AssetsProcessingSettingsRepresentative_1.default {
|
|
706
|
+
TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM = "Image";
|
|
707
|
+
TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = "Images";
|
|
701
708
|
assetsProcessingCommonSettings;
|
|
702
709
|
actualAssetsGroupsSettings;
|
|
703
710
|
constructor(imagesManagementSettings, masterConfigRepresentative) {
|
|
@@ -753,6 +760,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
753
760
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
754
761
|
};
|
|
755
762
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
763
|
+
const ImagesProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @ImagesProcessing/ImagesProcessingSettingsRepresentative */ "./ProjectBuilding/AssetsProcessing/Images/ImagesProcessingSettingsRepresentative.ts"));
|
|
756
764
|
/* --- Tasks executor ----------------------------------------------------------------------------------------------- */
|
|
757
765
|
const GulpStreamsBasedAssetsProcessor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor.ts"));
|
|
758
766
|
/* --- Applied utils ------------------------------------------------------------------------------------------------ */
|
|
@@ -810,7 +818,7 @@ class ImagesProcessor extends GulpStreamsBasedAssetsProcessor_1.default {
|
|
|
810
818
|
fileInInitialState.processingSettings = normalizedImagesGroupSettingsActualForCurrentFile;
|
|
811
819
|
/* [ Theory ] The value of 'path' could change during file processing. */
|
|
812
820
|
fileInInitialState.sourceAbsolutePath = fileInInitialState.path;
|
|
813
|
-
fileInInitialState.outputDirectoryAbsolutePath =
|
|
821
|
+
fileInInitialState.outputDirectoryAbsolutePath = ImagesProcessingSettingsRepresentative_1.default.
|
|
814
822
|
computeActualOutputDirectoryAbsolutePathForTargetSourceFile({
|
|
815
823
|
targetSourceFileAbsolutePath: fileInInitialState.path,
|
|
816
824
|
respectiveAssetsGroupNormalizedSettings: normalizedImagesGroupSettingsActualForCurrentFile
|
|
@@ -911,6 +919,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
911
919
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
912
920
|
const AssetsProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative */ "./ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative.ts"));
|
|
913
921
|
class VideosProcessingSettingsRepresentative extends AssetsProcessingSettingsRepresentative_1.default {
|
|
922
|
+
TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM = "Video";
|
|
923
|
+
TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = "Videos";
|
|
914
924
|
assetsProcessingCommonSettings;
|
|
915
925
|
actualAssetsGroupsSettings;
|
|
916
926
|
constructor(videosManagementSettings, masterConfigRepresentative) {
|
|
@@ -966,6 +976,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
966
976
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
967
977
|
};
|
|
968
978
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
979
|
+
const VideosProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @VideosProcessing/VideosProcessingSettingsRepresentative */ "./ProjectBuilding/AssetsProcessing/Videos/VideosProcessingSettingsRepresentative.ts"));
|
|
969
980
|
/* --- Tasks executor ----------------------------------------------------------------------------------------------- */
|
|
970
981
|
const GulpStreamsBasedAssetsProcessor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor.ts"));
|
|
971
982
|
/* --- Applied utils ------------------------------------------------------------------------------------------------ */
|
|
@@ -1014,7 +1025,7 @@ class VideosProcessor extends GulpStreamsBasedAssetsProcessor_1.default {
|
|
|
1014
1025
|
fileInInitialState.processingSettings = normalizedVideosGroupSettingsActualForCurrentFile;
|
|
1015
1026
|
/* [ Theory ] The value of 'path' could change during file processing. */
|
|
1016
1027
|
fileInInitialState.sourceAbsolutePath = fileInInitialState.path;
|
|
1017
|
-
fileInInitialState.outputDirectoryAbsolutePath =
|
|
1028
|
+
fileInInitialState.outputDirectoryAbsolutePath = VideosProcessingSettingsRepresentative_1.default.
|
|
1018
1029
|
computeActualOutputDirectoryAbsolutePathForTargetSourceFile({
|
|
1019
1030
|
targetSourceFileAbsolutePath: fileInInitialState.path,
|
|
1020
1031
|
respectiveAssetsGroupNormalizedSettings: normalizedVideosGroupSettingsActualForCurrentFile
|
|
@@ -1082,8 +1093,8 @@ class BrowserLiveReloader {
|
|
|
1082
1093
|
clearTimeout(waitingForOtherFilesWillBeUpdatedCountdown);
|
|
1083
1094
|
es_extensions_1.Logger.logInfo({
|
|
1084
1095
|
title: "Output files watcher",
|
|
1085
|
-
description: `
|
|
1086
|
-
`\n
|
|
1096
|
+
description: ` Event : ${ChokidarSpecialist_1.default.getEventNameInterpretation(eventName)}` +
|
|
1097
|
+
`\n Path : ${fileOrDirectoryPath}\n` +
|
|
1087
1098
|
"Waiting for status changing of other output files..."
|
|
1088
1099
|
});
|
|
1089
1100
|
waitingForOtherFilesWillBeUpdatedCountdown = setTimeout(() => {
|
|
@@ -2072,27 +2083,9 @@ const ImprovedPath_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/I
|
|
|
2072
2083
|
const ImprovedGlob_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/ImprovedGlob */ "./UtilsIncubator/ImprovedGlob.ts"));
|
|
2073
2084
|
class AssetsProcessingSettingsRepresentative {
|
|
2074
2085
|
sourceFilesAbsolutePathsAndOutputFilesActualPathsMap = new Map();
|
|
2075
|
-
|
|
2086
|
+
prefixOfAliasOfTopDirectoryOfEntryPointsGroup = "@";
|
|
2076
2087
|
masterConfigRepresentative;
|
|
2077
|
-
|
|
2078
|
-
this.masterConfigRepresentative = masterConfigRepresentative;
|
|
2079
|
-
}
|
|
2080
|
-
get supportedSourceFilesNamesExtensionsWithoutLeadingDots() {
|
|
2081
|
-
return this.assetsProcessingCommonSettings.supportedSourceFilesNamesExtensionsWithoutLeadingDots;
|
|
2082
|
-
}
|
|
2083
|
-
get hasAtLeastOneActualAssetsGroup() {
|
|
2084
|
-
return this.actualAssetsGroupsSettings.size > 0;
|
|
2085
|
-
}
|
|
2086
|
-
get actualAssetsSourceFilesAbsolutePaths() {
|
|
2087
|
-
const assetsSourceFilesAbsolutePaths = [];
|
|
2088
|
-
this.actualAssetsGroupsSettings.forEach((assetsGroupSettings) => {
|
|
2089
|
-
assetsSourceFilesAbsolutePaths.push(...ImprovedGlob_1.default.getFilesAbsolutePathsSynchronously([
|
|
2090
|
-
assetsGroupSettings.sourceFilesGlobSelector
|
|
2091
|
-
]));
|
|
2092
|
-
});
|
|
2093
|
-
return assetsSourceFilesAbsolutePaths;
|
|
2094
|
-
}
|
|
2095
|
-
computeActualOutputDirectoryAbsolutePathForTargetSourceFile({ targetSourceFileAbsolutePath, respectiveAssetsGroupNormalizedSettings }) {
|
|
2088
|
+
static computeActualOutputDirectoryAbsolutePathForTargetSourceFile({ targetSourceFileAbsolutePath, respectiveAssetsGroupNormalizedSettings }) {
|
|
2096
2089
|
let outputDirectoryAbsolutePathForCurrentSourceFile = ImprovedPath_1.default.buildAbsolutePath([
|
|
2097
2090
|
respectiveAssetsGroupNormalizedSettings.outputFilesTopDirectoryAbsolutePath,
|
|
2098
2091
|
ImprovedPath_1.default.computeRelativePath({
|
|
@@ -2120,6 +2113,24 @@ class AssetsProcessingSettingsRepresentative {
|
|
|
2120
2113
|
}
|
|
2121
2114
|
return outputDirectoryAbsolutePathForCurrentSourceFile;
|
|
2122
2115
|
}
|
|
2116
|
+
constructor(masterConfigRepresentative) {
|
|
2117
|
+
this.masterConfigRepresentative = masterConfigRepresentative;
|
|
2118
|
+
}
|
|
2119
|
+
get supportedSourceFilesNamesExtensionsWithoutLeadingDots() {
|
|
2120
|
+
return this.assetsProcessingCommonSettings.supportedSourceFilesNamesExtensionsWithoutLeadingDots;
|
|
2121
|
+
}
|
|
2122
|
+
get hasAtLeastOneActualAssetsGroup() {
|
|
2123
|
+
return this.actualAssetsGroupsSettings.size > 0;
|
|
2124
|
+
}
|
|
2125
|
+
get actualAssetsSourceFilesAbsolutePaths() {
|
|
2126
|
+
const assetsSourceFilesAbsolutePaths = [];
|
|
2127
|
+
this.actualAssetsGroupsSettings.forEach((assetsGroupSettings) => {
|
|
2128
|
+
assetsSourceFilesAbsolutePaths.push(...ImprovedGlob_1.default.getFilesAbsolutePathsSynchronously([
|
|
2129
|
+
assetsGroupSettings.sourceFilesGlobSelector
|
|
2130
|
+
]));
|
|
2131
|
+
});
|
|
2132
|
+
return assetsSourceFilesAbsolutePaths;
|
|
2133
|
+
}
|
|
2123
2134
|
getAssetsNormalizedSettingsActualForTargetSourceFile(targetSourceFileAbsolutePath) {
|
|
2124
2135
|
const assetsNormalizedSettingsActualForTargetSourceFile = Array.from(this.actualAssetsGroupsSettings.values()).
|
|
2125
2136
|
find((assetsGroupNormalizedSettings) => ImprovedGlob_1.default.isFileMatchingWithGlobSelector({
|
|
@@ -2179,6 +2190,19 @@ class GulpStreamBasedSourceCodeProcessingConfigRepresentative extends SourceCode
|
|
|
2179
2190
|
static #localization = GulpStreamBasedSourceCodeProcessingConfigRepresentative.getDefaultLocalization();
|
|
2180
2191
|
partialFilesAndEntryPointsRelationsMap = new Map();
|
|
2181
2192
|
onPartialFilesAndEntryPointsRelationsMapUpdatedEventSubscribers = [];
|
|
2193
|
+
/* === Static helpers ============================================================================================= */
|
|
2194
|
+
static computeRelevantOutputDirectoryAbsolutePathForTargetSourceFile(targetSourceFileAbsolutePath, respectiveEntryPointsGroupSettings) {
|
|
2195
|
+
if (respectiveEntryPointsGroupSettings.isSingeEntryPointGroup) {
|
|
2196
|
+
return respectiveEntryPointsGroupSettings.outputFilesTopDirectoryAbsolutePath;
|
|
2197
|
+
}
|
|
2198
|
+
return ImprovedPath_1.default.buildAbsolutePath([
|
|
2199
|
+
respectiveEntryPointsGroupSettings.outputFilesTopDirectoryAbsolutePath,
|
|
2200
|
+
ImprovedPath_1.default.computeRelativePath({
|
|
2201
|
+
basePath: respectiveEntryPointsGroupSettings.sourceFilesTopDirectoryAbsolutePath,
|
|
2202
|
+
comparedPath: ImprovedPath_1.default.extractDirectoryFromFilePath(targetSourceFileAbsolutePath)
|
|
2203
|
+
})
|
|
2204
|
+
], { forwardSlashOnlySeparators: true });
|
|
2205
|
+
}
|
|
2182
2206
|
static setLocalization(newLocalization) {
|
|
2183
2207
|
this.#localization = newLocalization;
|
|
2184
2208
|
}
|
|
@@ -2219,20 +2243,6 @@ class GulpStreamBasedSourceCodeProcessingConfigRepresentative extends SourceCode
|
|
|
2219
2243
|
}
|
|
2220
2244
|
return entryPointsGroupsNormalizedSettingsRelevantForTargetSourceFile;
|
|
2221
2245
|
}
|
|
2222
|
-
/* eslint-disable-next-line class-methods-use-this --
|
|
2223
|
-
* Intended to be inherited and used by inheritors. */
|
|
2224
|
-
computeRelevantOutputDirectoryAbsolutePathForTargetSourceFile(targetSourceFileAbsolutePath, respectiveEntryPointsGroupSettings) {
|
|
2225
|
-
if (respectiveEntryPointsGroupSettings.isSingeEntryPointGroup) {
|
|
2226
|
-
return respectiveEntryPointsGroupSettings.outputFilesTopDirectoryAbsolutePath;
|
|
2227
|
-
}
|
|
2228
|
-
return ImprovedPath_1.default.buildAbsolutePath([
|
|
2229
|
-
respectiveEntryPointsGroupSettings.outputFilesTopDirectoryAbsolutePath,
|
|
2230
|
-
ImprovedPath_1.default.computeRelativePath({
|
|
2231
|
-
basePath: respectiveEntryPointsGroupSettings.sourceFilesTopDirectoryAbsolutePath,
|
|
2232
|
-
comparedPath: ImprovedPath_1.default.extractDirectoryFromFilePath(targetSourceFileAbsolutePath)
|
|
2233
|
-
})
|
|
2234
|
-
], { forwardSlashOnlySeparators: true });
|
|
2235
|
-
}
|
|
2236
2246
|
/* === Partial files and entry points relations map ============================================================= */
|
|
2237
2247
|
initializeOrUpdatePartialFilesAndEntryPointsRelationsMap() {
|
|
2238
2248
|
this.partialFilesAndEntryPointsRelationsMap.clear();
|
|
@@ -2248,7 +2258,7 @@ class GulpStreamBasedSourceCodeProcessingConfigRepresentative extends SourceCode
|
|
|
2248
2258
|
subscribeOnPartialFilesAndEntryPointsRelationsMapUpdatedEvent(subscriber) {
|
|
2249
2259
|
this.onPartialFilesAndEntryPointsRelationsMapUpdatedEventSubscribers.push(subscriber);
|
|
2250
2260
|
}
|
|
2251
|
-
/* === Localization
|
|
2261
|
+
/* === Localization =============================================================================================== */
|
|
2252
2262
|
static getDefaultLocalization() {
|
|
2253
2263
|
return {
|
|
2254
2264
|
generateEntryPointsGroupNormalizedSettingsNotFoundForSpecifiedFilePath: ({ targetSourceFileAbsolutePath }) => `No normalized config found for file '${targetSourceFileAbsolutePath}'.'`
|
|
@@ -3556,7 +3566,10 @@ class ECMA_ScriptLogicProcessingRawSettingsNormalizer extends SourceCodeProcessi
|
|
|
3556
3566
|
revisioning: {
|
|
3557
3567
|
mustExecute: entryPointsGroupSettings__rawValid.buildingModeDependent[this.consumingProjectBuildingMode].
|
|
3558
3568
|
revisioning?.disable === true ?
|
|
3559
|
-
false : ECMA_ScriptLogicProcessingSettings__Default_1.default.revisioning.mustExecute(
|
|
3569
|
+
false : ECMA_ScriptLogicProcessingSettings__Default_1.default.revisioning.mustExecute({
|
|
3570
|
+
consumingProjectBuildingMode: this.consumingProjectBuildingMode,
|
|
3571
|
+
targetRuntimeType: entryPointsGroupSettings__rawValid.targetRuntime.type
|
|
3572
|
+
}),
|
|
3560
3573
|
contentHashPostfixSeparator: entryPointsGroupSettings__rawValid.buildingModeDependent[this.consumingProjectBuildingMode].
|
|
3561
3574
|
revisioning?.contentHashPostfixSeparator ??
|
|
3562
3575
|
ECMA_ScriptLogicProcessingSettings__Default_1.default.revisioning.contentHashPostfixSeparator
|
|
@@ -3609,7 +3622,9 @@ const SourceCodeProcessingConfigRepresentative_1 = __importDefault(__webpack_req
|
|
|
3609
3622
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
3610
3623
|
class ECMA_ScriptLogicProcessingSettingsRepresentative extends SourceCodeProcessingConfigRepresentative_1.default {
|
|
3611
3624
|
supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots;
|
|
3625
|
+
TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM = "Script";
|
|
3612
3626
|
TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = "Scripts";
|
|
3627
|
+
prefixOfAliasOfTopDirectoryOfEntryPointsGroup = "@";
|
|
3613
3628
|
relevantEntryPointsGroupsSettings;
|
|
3614
3629
|
entryPointsSourceFilesAbsolutePathsAndOutputFilesActualPathsMap = new Map();
|
|
3615
3630
|
sourceCodeProcessingCommonSettings;
|
|
@@ -3655,13 +3670,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3655
3670
|
};
|
|
3656
3671
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3657
3672
|
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding:Common/Defaults/ConsumingProjectPreDefinedBuildingModes */ "./ProjectBuilding/Common/Defaults/ConsumingProjectPreDefinedBuildingModes.ts"));
|
|
3673
|
+
const ECMA_ScriptLogicProcessingRestrictions_1 = __importDefault(__webpack_require__(/*! @ECMA_ScriptProcessing/ECMA_ScriptLogicProcessingRestrictions */ "./ProjectBuilding/SourceCodeProcessing/ECMA_Script/ECMA_ScriptLogicProcessingRestrictions.ts"));
|
|
3674
|
+
var SupportedECMA_ScriptRuntimesTypes = ECMA_ScriptLogicProcessingRestrictions_1.default.SupportedECMA_ScriptRuntimesTypes;
|
|
3658
3675
|
exports["default"] = {
|
|
3659
3676
|
filePathAliasNotation: "@",
|
|
3660
3677
|
entryPointsGroupDependent: {
|
|
3661
3678
|
areExportsFromEntryPointsAccessible: false
|
|
3662
3679
|
},
|
|
3663
3680
|
revisioning: {
|
|
3664
|
-
mustExecute
|
|
3681
|
+
mustExecute(namedParameters) {
|
|
3682
|
+
if (namedParameters.targetRuntimeType === SupportedECMA_ScriptRuntimesTypes.browser ||
|
|
3683
|
+
namedParameters.targetRuntimeType === SupportedECMA_ScriptRuntimesTypes.webWorker) {
|
|
3684
|
+
return namedParameters.consumingProjectBuildingMode !== ConsumingProjectPreDefinedBuildingModes_1.default.development;
|
|
3685
|
+
}
|
|
3686
|
+
return false;
|
|
3687
|
+
},
|
|
3665
3688
|
contentHashPostfixSeparator: "--"
|
|
3666
3689
|
},
|
|
3667
3690
|
linting: {
|
|
@@ -4013,6 +4036,10 @@ class ECMA_ScriptLogicEntryPointsSourceFilesAbsolutePathsAndOutputFilesActualPat
|
|
|
4013
4036
|
else {
|
|
4014
4037
|
correspondingOutputFileAbsolutePath = ImprovedPath_1.default.buildAbsolutePath([
|
|
4015
4038
|
entryPointsGroupNormalizedSettings.outputFilesTopDirectoryAbsolutePath,
|
|
4039
|
+
ImprovedPath_1.default.computeRelativePath({
|
|
4040
|
+
comparedPath: ImprovedPath_1.default.extractDirectoryFromFilePath(sourceFileAbsolutePath),
|
|
4041
|
+
basePath: entryPointsGroupNormalizedSettings.sourceFilesTopDirectoryAbsolutePath
|
|
4042
|
+
}),
|
|
4016
4043
|
`${ImprovedPath_1.default.extractFileNameWithoutExtensionFromPath(sourceFileAbsolutePath)}.js`
|
|
4017
4044
|
], { forwardSlashOnlySeparators: true });
|
|
4018
4045
|
}
|
|
@@ -4740,6 +4767,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4740
4767
|
};
|
|
4741
4768
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4742
4769
|
exports.MarkupProcessor = void 0;
|
|
4770
|
+
const MarkupProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/MarkupProcessingSettingsRepresentative */ "./ProjectBuilding/SourceCodeProcessing/Markup/MarkupProcessingSettingsRepresentative.ts"));
|
|
4743
4771
|
/* --- Tasks executors ---------------------------------------------------------------------------------------------- */
|
|
4744
4772
|
const GulpStreamsBasedSourceCodeProcessor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedSourceCodeProcessor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedSourceCodeProcessor.ts"));
|
|
4745
4773
|
/* --- Gulp plugins ------------------------------------------------------------------------------------------------- */
|
|
@@ -4748,7 +4776,7 @@ const gulp_pug_1 = __importDefault(__webpack_require__(/*! gulp-pug */ "gulp-pug
|
|
|
4748
4776
|
const gulp_intercept_1 = __importDefault(__webpack_require__(/*! gulp-intercept */ "gulp-intercept"));
|
|
4749
4777
|
const gulp_html_prettify_1 = __importDefault(__webpack_require__(/*! gulp-html-prettify */ "gulp-html-prettify"));
|
|
4750
4778
|
/* --- Applied utils ------------------------------------------------------------------------------------------------ */
|
|
4751
|
-
const
|
|
4779
|
+
const ResourceFilesPathsAliasesResolverForHTML_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/AssetsPathsAliasesResolverForHTML/ResourceFilesPathsAliasesResolverForHTML */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/ResourceFilesPathsAliasesResolverForHTML.ts"));
|
|
4752
4780
|
const HTML_Validator_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/HTML_Validator/HTML_Validator */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_Validator.ts"));
|
|
4753
4781
|
const AccessibilityInspector_1 = __importDefault(__webpack_require__(/*! ./Plugins/AccessibilityInspector/AccessibilityInspector */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AccessibilityInspector/AccessibilityInspector.ts"));
|
|
4754
4782
|
const removeExtraSpacesFromJapaneseText_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/removeExtraSpacesFromJapaneseText */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/removeExtraSpacesFromJapaneseText.ts"));
|
|
@@ -4807,13 +4835,13 @@ class MarkupProcessor extends GulpStreamsBasedSourceCodeProcessor_1.default {
|
|
|
4807
4835
|
fileInInitialState.processingSettings = markupEntryPointsGroupSettingsActualForCurrentFile;
|
|
4808
4836
|
/* [ Theory ] The value of 'path' could change during file processing. */
|
|
4809
4837
|
fileInInitialState.sourceAbsolutePath = ImprovedPath_1.default.replacePathSeparatorsToForwardSlashes(fileInInitialState.path);
|
|
4810
|
-
fileInInitialState.outputDirectoryAbsolutePath =
|
|
4838
|
+
fileInInitialState.outputDirectoryAbsolutePath = MarkupProcessingSettingsRepresentative_1.default.
|
|
4811
4839
|
computeRelevantOutputDirectoryAbsolutePathForTargetSourceFile(fileInInitialState.path, markupEntryPointsGroupSettingsActualForCurrentFile);
|
|
4812
4840
|
return fileInInitialState;
|
|
4813
4841
|
}
|
|
4814
4842
|
onRawOutputCode(_compiledHTML_File) {
|
|
4815
4843
|
const compiledHTML_File = _compiledHTML_File;
|
|
4816
|
-
compiledHTML_File.contents = Buffer.from(
|
|
4844
|
+
compiledHTML_File.contents = Buffer.from(ResourceFilesPathsAliasesResolverForHTML_1.default.resolvePathAliases(compiledHTML_File, this.masterConfigRepresentative));
|
|
4817
4845
|
return compiledHTML_File;
|
|
4818
4846
|
}
|
|
4819
4847
|
onPostProcessedCode(_compiledHTML_File) {
|
|
@@ -4849,7 +4877,7 @@ const AccessibilityInspectorLocalization_english_1 = __importDefault(__webpack_r
|
|
|
4849
4877
|
/* --- Applied utils ------------------------------------------------------------------------------------------------ */
|
|
4850
4878
|
const access_sniff_1 = __importDefault(__webpack_require__(/*! access-sniff */ "access-sniff"));
|
|
4851
4879
|
const node_notifier_1 = __importDefault(__webpack_require__(/*! node-notifier */ "node-notifier"));
|
|
4852
|
-
const
|
|
4880
|
+
const getExpectedToBeNonNullStringifiedContentOfVinylFile_1 = __importDefault(__webpack_require__(/*! @Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile */ "./Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile.ts"));
|
|
4853
4881
|
const isCompiledHTML_ContentEmpty_1 = __importDefault(__webpack_require__(/*! @Utils/isCompiledHTML_ContentEmpty */ "./Utils/isCompiledHTML_ContentEmpty.ts"));
|
|
4854
4882
|
/* --- General utils ------------------------------------------------------------------------------------------------ */
|
|
4855
4883
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
@@ -4858,7 +4886,7 @@ const Stopwatch_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/Stop
|
|
|
4858
4886
|
class AccessibilityInspector {
|
|
4859
4887
|
static localization = AccessibilityInspectorLocalization_english_1.default;
|
|
4860
4888
|
static inspectAccessibility(compiledHTML_File, masterConfigRepresentative) {
|
|
4861
|
-
const extractedHTML_Code = (0,
|
|
4889
|
+
const extractedHTML_Code = (0, getExpectedToBeNonNullStringifiedContentOfVinylFile_1.default)(compiledHTML_File);
|
|
4862
4890
|
const targetFileRelativePath = ImprovedPath_1.default.computeRelativePath({
|
|
4863
4891
|
basePath: masterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath,
|
|
4864
4892
|
comparedPath: compiledHTML_File.path
|
|
@@ -4873,7 +4901,7 @@ class AccessibilityInspector {
|
|
|
4873
4901
|
* 1. With '{ verbose: true }' (default) it will be a lot of recommendations which never disappear. The output pollution.
|
|
4874
4902
|
* 2. In `import AccessSniff, { reports } from 'access-sniff';`, the 'reports' are 'undefined',
|
|
4875
4903
|
* 3. In 'then(function(report) {}}', the 'report' is an empty object. */
|
|
4876
|
-
(0, access_sniff_1.default)((0,
|
|
4904
|
+
(0, access_sniff_1.default)((0, getExpectedToBeNonNullStringifiedContentOfVinylFile_1.default)(compiledHTML_File), {
|
|
4877
4905
|
verbose: false,
|
|
4878
4906
|
accessibilityLevel: compiledHTML_File.processingSettings.accessibilityInspection.standard
|
|
4879
4907
|
}).
|
|
@@ -4957,10 +4985,50 @@ exports["default"] = AccessibilityInspectorLocalization__English;
|
|
|
4957
4985
|
|
|
4958
4986
|
/***/ }),
|
|
4959
4987
|
|
|
4960
|
-
/***/ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML.ts":
|
|
4961
|
-
|
|
4962
|
-
!*** ./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML.ts ***!
|
|
4963
|
-
|
|
4988
|
+
/***/ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/AssetsPathsAliasesResolverForHTML_Localization.english.ts":
|
|
4989
|
+
/*!*********************************************************************************************************************************************************!*\
|
|
4990
|
+
!*** ./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/AssetsPathsAliasesResolverForHTML_Localization.english.ts ***!
|
|
4991
|
+
\*********************************************************************************************************************************************************/
|
|
4992
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
4993
|
+
|
|
4994
|
+
|
|
4995
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4996
|
+
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
4997
|
+
const assetsPathsAliasesResolverForHTML_Localization__english = {
|
|
4998
|
+
generateUnableToResolveShortenedAbsolutePathWarning: (namedParameters) => ({
|
|
4999
|
+
title: `${(0, es_extensions_1.capitalizeFirstCharacter)(namedParameters.filesType__singularForm)} file, unable to resolve the absolute path`,
|
|
5000
|
+
description: `Unable to resolve the shortened absolute path for the ${namedParameters.filesType__singularForm} file ` +
|
|
5001
|
+
`because no public path has been specified for '${namedParameters.projectBuildingMode}' project building mode. ` +
|
|
5002
|
+
"Relative path will be used instead."
|
|
5003
|
+
}),
|
|
5004
|
+
generateUnknownSourceFileTopDirectoryAliasWarning: (namedParameters) => ({
|
|
5005
|
+
title: `${namedParameters.fileType__singularForm} file, unknown directory path alias`,
|
|
5006
|
+
description: `The alias '${namedParameters.firstPathSegment}' in path ` +
|
|
5007
|
+
`'${namedParameters.pickedPathOfTargetResourceFile}' has not been specified neither explicitly nor implicitly ` +
|
|
5008
|
+
"(via resources group name). Below directories paths' aliases are available for usage: \n" +
|
|
5009
|
+
`${namedParameters.formattedSourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap}`
|
|
5010
|
+
}),
|
|
5011
|
+
generateNoMatchingsForAliasedFilePathWithoutFilenameExtensionWarning: (namedParameters) => ({
|
|
5012
|
+
title: `Unknown path to ${namedParameters.fileType__singularForm} file`,
|
|
5013
|
+
description: `The aliased path '${namedParameters.pickedPathOfTargetResourceFile}' without filename extension ` +
|
|
5014
|
+
"refers to unknown file. Tried to search with all supported filename extensions: " +
|
|
5015
|
+
`${namedParameters.checkedAbsolutePaths__formatted}.`
|
|
5016
|
+
}),
|
|
5017
|
+
generateNoOutputFileExistingForSpecifiedSourceFilePath: (namedParameters) => ({
|
|
5018
|
+
title: `Unknown path to ${namedParameters.fileType__singularForm} file`,
|
|
5019
|
+
description: `No ${namedParameters.fileType__singularForm} output file has been found for specified aliased source ` +
|
|
5020
|
+
`file path '${namedParameters.pickedPathOfTargetResourceFile}'.`
|
|
5021
|
+
})
|
|
5022
|
+
};
|
|
5023
|
+
exports["default"] = assetsPathsAliasesResolverForHTML_Localization__english;
|
|
5024
|
+
|
|
5025
|
+
|
|
5026
|
+
/***/ }),
|
|
5027
|
+
|
|
5028
|
+
/***/ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/ResourceFilesPathsAliasesResolverForHTML.ts":
|
|
5029
|
+
/*!*******************************************************************************************************************************************!*\
|
|
5030
|
+
!*** ./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/ResourceFilesPathsAliasesResolverForHTML.ts ***!
|
|
5031
|
+
\*******************************************************************************************************************************************/
|
|
4964
5032
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
4965
5033
|
|
|
4966
5034
|
|
|
@@ -4968,61 +5036,70 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4968
5036
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4969
5037
|
};
|
|
4970
5038
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5039
|
+
/* --- Assets ------------------------------------------------------------------------------------------------------- */
|
|
5040
|
+
const AssetsPathsAliasesResolverForHTML_Localization_english_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/AssetsPathsAliasesResolverForHTML/AssetsPathsAliasesResolverForHTML_Localization.english */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/AssetsPathsAliasesResolverForHTML_Localization.english.ts"));
|
|
4971
5041
|
/* --- Applied auxiliaries ------------------------------------------------------------------------------------------ */
|
|
4972
5042
|
const cheerio_1 = __importDefault(__webpack_require__(/*! cheerio */ "cheerio"));
|
|
4973
|
-
const
|
|
5043
|
+
const getExpectedToBeNonNullStringifiedContentOfVinylFile_1 = __importDefault(__webpack_require__(/*! @Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile */ "./Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile.ts"));
|
|
4974
5044
|
/* --- General auxiliaries ------------------------------------------------------------------------------------------ */
|
|
4975
5045
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
4976
5046
|
const ImprovedPath_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/ImprovedPath/ImprovedPath */ "./UtilsIncubator/ImprovedPath/ImprovedPath.ts"));
|
|
4977
|
-
class
|
|
5047
|
+
class ResourceFilesPathsAliasesResolverForHTML {
|
|
5048
|
+
static localization = AssetsPathsAliasesResolverForHTML_Localization_english_1.default;
|
|
4978
5049
|
compiledHTML_File;
|
|
4979
|
-
|
|
5050
|
+
HTML_FileContentCheerioCapturing;
|
|
4980
5051
|
masterConfigRepresentative;
|
|
4981
|
-
static
|
|
4982
|
-
return new
|
|
5052
|
+
static resolvePathAliases(compiledHTML_File, masterConfigRepresentative) {
|
|
5053
|
+
return new ResourceFilesPathsAliasesResolverForHTML(compiledHTML_File, masterConfigRepresentative).
|
|
4983
5054
|
resolveStylesheetsPathsAliases().
|
|
4984
5055
|
resoleScriptsPathsAliases().
|
|
4985
5056
|
resolveImagesPathsAliases().
|
|
4986
5057
|
resolveVideosPathsAliases().
|
|
4987
5058
|
resolveAudiosPathsAliases().
|
|
4988
|
-
/*
|
|
4989
|
-
|
|
5059
|
+
/* [ Theory ] Without '{ decodeEntities: false }' all ideographic characters will be converted to entities
|
|
5060
|
+
* like '文' what could cause some troubles during HTML code post-processing. */
|
|
5061
|
+
HTML_FileContentCheerioCapturing.
|
|
5062
|
+
html({ decodeEntities: false });
|
|
4990
5063
|
}
|
|
4991
5064
|
constructor(compiledHTML_File, masterConfigRepresentative) {
|
|
4992
5065
|
this.compiledHTML_File = compiledHTML_File;
|
|
4993
|
-
this
|
|
5066
|
+
this.HTML_FileContentCheerioCapturing = cheerio_1.default.load((0, getExpectedToBeNonNullStringifiedContentOfVinylFile_1.default)(compiledHTML_File));
|
|
4994
5067
|
this.masterConfigRepresentative = masterConfigRepresentative;
|
|
4995
5068
|
}
|
|
4996
5069
|
resolveStylesheetsPathsAliases() {
|
|
4997
5070
|
if ((0, es_extensions_1.isUndefined)(this.masterConfigRepresentative.stylesProcessingSettingsRepresentative)) {
|
|
4998
5071
|
return this;
|
|
4999
5072
|
}
|
|
5000
|
-
const
|
|
5001
|
-
for (const linkElement of Array.from(this
|
|
5002
|
-
const $
|
|
5003
|
-
const hrefAttributeValue = $
|
|
5004
|
-
if ((0, es_extensions_1.
|
|
5073
|
+
const stylesProcessingSettingsRepresentative = this.masterConfigRepresentative.stylesProcessingSettingsRepresentative;
|
|
5074
|
+
for (const linkElement of Array.from(this.HTML_FileContentCheerioCapturing("link[rel='stylesheet']"))) {
|
|
5075
|
+
const $linkElement = this.HTML_FileContentCheerioCapturing(linkElement);
|
|
5076
|
+
const hrefAttributeValue = $linkElement.attr("href");
|
|
5077
|
+
if (!(0, es_extensions_1.isNonEmptyString)(hrefAttributeValue)) {
|
|
5005
5078
|
continue;
|
|
5006
5079
|
}
|
|
5007
|
-
const
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.createMapBasedOnOtherMap)(
|
|
5080
|
+
const resolvedOutputAbsolutePathOfStylesheet = this.resolveOutputResourceFileAbsolutePathIfPossible({
|
|
5081
|
+
pickedPathOfTargetResourceFile: hrefAttributeValue,
|
|
5082
|
+
prefixOfAliasOfTopDirectoryOfResourcesGroup: stylesProcessingSettingsRepresentative.
|
|
5083
|
+
prefixOfAliasOfTopDirectoryOfEntryPointsGroup,
|
|
5084
|
+
sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.createMapBasedOnOtherMap)(stylesProcessingSettingsRepresentative.entryPointsGroupsNormalizedSettingsMappedByPathAliases, (pathAlias, stylesEntryPointsGroupNormalizedSettings) => [
|
|
5012
5085
|
pathAlias,
|
|
5013
5086
|
stylesEntryPointsGroupNormalizedSettings.isSingeEntryPointGroup ?
|
|
5014
5087
|
stylesEntryPointsGroupNormalizedSettings.sourceFilesGlobSelectors[0] :
|
|
5015
5088
|
stylesEntryPointsGroupNormalizedSettings.sourceFilesTopDirectoryAbsolutePath
|
|
5016
5089
|
]),
|
|
5017
|
-
supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots:
|
|
5090
|
+
supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots: stylesProcessingSettingsRepresentative.
|
|
5018
5091
|
supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots,
|
|
5019
|
-
sourceAndOutputFilesAbsolutePathsCorrespondenceMap:
|
|
5020
|
-
|
|
5092
|
+
sourceAndOutputFilesAbsolutePathsCorrespondenceMap: stylesProcessingSettingsRepresentative.sourceAndOutputFilesAbsolutePathsCorrespondenceMap,
|
|
5093
|
+
fileTypeForLogging__singularForm: stylesProcessingSettingsRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM,
|
|
5094
|
+
fileTypeForLogging__pluralForm: stylesProcessingSettingsRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
|
|
5021
5095
|
});
|
|
5022
|
-
if ((0, es_extensions_1.isNull)(
|
|
5096
|
+
if ((0, es_extensions_1.isNull)(resolvedOutputAbsolutePathOfStylesheet)) {
|
|
5023
5097
|
continue;
|
|
5024
5098
|
}
|
|
5025
|
-
$
|
|
5099
|
+
$linkElement.attr("href", this.buildResourceFileFinalPath({
|
|
5100
|
+
resolvedOutputAbsolutePathOfResourceFile: resolvedOutputAbsolutePathOfStylesheet,
|
|
5101
|
+
resourceFileType__singularForm: stylesProcessingSettingsRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
|
|
5102
|
+
}));
|
|
5026
5103
|
}
|
|
5027
5104
|
return this;
|
|
5028
5105
|
}
|
|
@@ -5031,16 +5108,16 @@ class AssetsPathsAliasesResolverForHTML {
|
|
|
5031
5108
|
return this;
|
|
5032
5109
|
}
|
|
5033
5110
|
const ECMA_ScriptLogicProcessingConfigRepresentative = this.masterConfigRepresentative.ECMA_ScriptLogicProcessingSettingsRepresentative;
|
|
5034
|
-
for (const scriptElement of Array.from(this
|
|
5035
|
-
const $
|
|
5036
|
-
const srcAttributeValue = $
|
|
5037
|
-
if ((0, es_extensions_1.
|
|
5111
|
+
for (const scriptElement of Array.from(this.HTML_FileContentCheerioCapturing("script"))) {
|
|
5112
|
+
const $scriptElement = this.HTML_FileContentCheerioCapturing(scriptElement);
|
|
5113
|
+
const srcAttributeValue = $scriptElement.attr("src");
|
|
5114
|
+
if (!(0, es_extensions_1.isNonEmptyString)(srcAttributeValue)) {
|
|
5038
5115
|
continue;
|
|
5039
5116
|
}
|
|
5040
|
-
const
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5117
|
+
const resolvedOutputAbsolutePathOfScript = this.resolveOutputResourceFileAbsolutePathIfPossible({
|
|
5118
|
+
pickedPathOfTargetResourceFile: srcAttributeValue,
|
|
5119
|
+
prefixOfAliasOfTopDirectoryOfResourcesGroup: ECMA_ScriptLogicProcessingConfigRepresentative.
|
|
5120
|
+
prefixOfAliasOfTopDirectoryOfEntryPointsGroup,
|
|
5044
5121
|
sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.createMapBasedOnOtherMap)(ECMA_ScriptLogicProcessingConfigRepresentative.entryPointsGroupsNormalizedSettingsMappedByPathAliases, (pathAlias, entryPointsGroupNormalizedSettings) => [
|
|
5045
5122
|
pathAlias,
|
|
5046
5123
|
entryPointsGroupNormalizedSettings.isSingeEntryPointGroup ?
|
|
@@ -5049,12 +5126,19 @@ class AssetsPathsAliasesResolverForHTML {
|
|
|
5049
5126
|
]),
|
|
5050
5127
|
supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots: ECMA_ScriptLogicProcessingConfigRepresentative.supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots,
|
|
5051
5128
|
sourceAndOutputFilesAbsolutePathsCorrespondenceMap: ECMA_ScriptLogicProcessingConfigRepresentative.entryPointsSourceFilesAbsolutePathsAndOutputFilesActualPathsMap,
|
|
5052
|
-
|
|
5129
|
+
fileTypeForLogging__singularForm: ECMA_ScriptLogicProcessingConfigRepresentative.
|
|
5130
|
+
TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM,
|
|
5131
|
+
fileTypeForLogging__pluralForm: ECMA_ScriptLogicProcessingConfigRepresentative.
|
|
5132
|
+
TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
|
|
5053
5133
|
});
|
|
5054
|
-
if ((0, es_extensions_1.isNull)(
|
|
5134
|
+
if ((0, es_extensions_1.isNull)(resolvedOutputAbsolutePathOfScript)) {
|
|
5055
5135
|
continue;
|
|
5056
5136
|
}
|
|
5057
|
-
$
|
|
5137
|
+
$scriptElement.attr("src", this.buildResourceFileFinalPath({
|
|
5138
|
+
resolvedOutputAbsolutePathOfResourceFile: resolvedOutputAbsolutePathOfScript,
|
|
5139
|
+
resourceFileType__singularForm: ECMA_ScriptLogicProcessingConfigRepresentative.
|
|
5140
|
+
TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM
|
|
5141
|
+
}));
|
|
5058
5142
|
}
|
|
5059
5143
|
return this;
|
|
5060
5144
|
}
|
|
@@ -5063,47 +5147,55 @@ class AssetsPathsAliasesResolverForHTML {
|
|
|
5063
5147
|
return this;
|
|
5064
5148
|
}
|
|
5065
5149
|
const imagesProcessingConfigRepresentative = this.masterConfigRepresentative.imagesProcessingSettingsRepresentative;
|
|
5066
|
-
for (const imageElement of Array.from(this
|
|
5067
|
-
const $
|
|
5068
|
-
const srcAttributeValue = $
|
|
5069
|
-
if ((0, es_extensions_1.
|
|
5150
|
+
for (const imageElement of Array.from(this.HTML_FileContentCheerioCapturing("img"))) {
|
|
5151
|
+
const $imageElement = this.HTML_FileContentCheerioCapturing(imageElement);
|
|
5152
|
+
const srcAttributeValue = $imageElement.attr("src");
|
|
5153
|
+
if (!(0, es_extensions_1.isNonEmptyString)(srcAttributeValue)) {
|
|
5070
5154
|
continue;
|
|
5071
5155
|
}
|
|
5072
|
-
const
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5156
|
+
const resolvedOutputAbsolutePathOfImage = this.resolveOutputResourceFileAbsolutePathIfPossible({
|
|
5157
|
+
pickedPathOfTargetResourceFile: srcAttributeValue,
|
|
5158
|
+
prefixOfAliasOfTopDirectoryOfResourcesGroup: imagesProcessingConfigRepresentative.
|
|
5159
|
+
prefixOfAliasOfTopDirectoryOfEntryPointsGroup,
|
|
5076
5160
|
sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.createMapBasedOnOtherMap)(imagesProcessingConfigRepresentative.assetsGroupsNormalizedSettingsMappedByAssetAliases, (pathAlias, stylesEntryPointsGroupNormalizedSettings) => [pathAlias, stylesEntryPointsGroupNormalizedSettings.sourceFilesTopDirectoryAbsolutePath]),
|
|
5077
5161
|
supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots: imagesProcessingConfigRepresentative.supportedSourceFilesNamesExtensionsWithoutLeadingDots,
|
|
5078
5162
|
sourceAndOutputFilesAbsolutePathsCorrespondenceMap: imagesProcessingConfigRepresentative.sourceFilesAbsolutePathsAndOutputFilesActualPathsMap,
|
|
5079
|
-
|
|
5163
|
+
fileTypeForLogging__singularForm: imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM,
|
|
5164
|
+
fileTypeForLogging__pluralForm: imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
|
|
5080
5165
|
});
|
|
5081
|
-
if ((0, es_extensions_1.isNull)(
|
|
5166
|
+
if ((0, es_extensions_1.isNull)(resolvedOutputAbsolutePathOfImage)) {
|
|
5082
5167
|
continue;
|
|
5083
5168
|
}
|
|
5084
|
-
$
|
|
5169
|
+
$imageElement.attr("src", this.buildResourceFileFinalPath({
|
|
5170
|
+
resolvedOutputAbsolutePathOfResourceFile: resolvedOutputAbsolutePathOfImage,
|
|
5171
|
+
resourceFileType__singularForm: imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
|
|
5172
|
+
}));
|
|
5085
5173
|
}
|
|
5086
|
-
for (const linkElement of Array.from(this
|
|
5087
|
-
const $
|
|
5088
|
-
const hrefAttributeValue = $
|
|
5174
|
+
for (const linkElement of Array.from(this.HTML_FileContentCheerioCapturing("link[type='image/x-icon']"))) {
|
|
5175
|
+
const $linkElement = this.HTML_FileContentCheerioCapturing(linkElement);
|
|
5176
|
+
const hrefAttributeValue = $linkElement.attr("href");
|
|
5089
5177
|
if ((0, es_extensions_1.isUndefined)(hrefAttributeValue)) {
|
|
5090
5178
|
continue;
|
|
5091
5179
|
}
|
|
5092
|
-
const imageResolvedOutputAbsolutePath =
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5180
|
+
const imageResolvedOutputAbsolutePath = this.resolveOutputResourceFileAbsolutePathIfPossible({
|
|
5181
|
+
pickedPathOfTargetResourceFile: hrefAttributeValue,
|
|
5182
|
+
prefixOfAliasOfTopDirectoryOfResourcesGroup: imagesProcessingConfigRepresentative.
|
|
5183
|
+
prefixOfAliasOfTopDirectoryOfEntryPointsGroup,
|
|
5096
5184
|
sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.createMapBasedOnOtherMap)(imagesProcessingConfigRepresentative.assetsGroupsNormalizedSettingsMappedByAssetAliases, (pathAlias, stylesEntryPointsGroupNormalizedSettings) => [
|
|
5097
5185
|
pathAlias, stylesEntryPointsGroupNormalizedSettings.sourceFilesTopDirectoryAbsolutePath
|
|
5098
5186
|
]),
|
|
5099
5187
|
supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots: imagesProcessingConfigRepresentative.supportedSourceFilesNamesExtensionsWithoutLeadingDots,
|
|
5100
5188
|
sourceAndOutputFilesAbsolutePathsCorrespondenceMap: imagesProcessingConfigRepresentative.sourceFilesAbsolutePathsAndOutputFilesActualPathsMap,
|
|
5101
|
-
|
|
5189
|
+
fileTypeForLogging__singularForm: imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM,
|
|
5190
|
+
fileTypeForLogging__pluralForm: imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
|
|
5102
5191
|
});
|
|
5103
5192
|
if ((0, es_extensions_1.isNull)(imageResolvedOutputAbsolutePath)) {
|
|
5104
5193
|
continue;
|
|
5105
5194
|
}
|
|
5106
|
-
$
|
|
5195
|
+
$linkElement.attr("href", this.buildResourceFileFinalPath({
|
|
5196
|
+
resolvedOutputAbsolutePathOfResourceFile: imageResolvedOutputAbsolutePath,
|
|
5197
|
+
resourceFileType__singularForm: imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM
|
|
5198
|
+
}));
|
|
5107
5199
|
}
|
|
5108
5200
|
return this;
|
|
5109
5201
|
}
|
|
@@ -5112,133 +5204,134 @@ class AssetsPathsAliasesResolverForHTML {
|
|
|
5112
5204
|
return this;
|
|
5113
5205
|
}
|
|
5114
5206
|
const videosProcessingConfigRepresentative = this.masterConfigRepresentative.videosProcessingSettingsRepresentative;
|
|
5115
|
-
for (const sourceElement of Array.from(this
|
|
5116
|
-
const $
|
|
5117
|
-
const srcAttributeValue = $
|
|
5118
|
-
if ((0, es_extensions_1.
|
|
5207
|
+
for (const sourceElement of Array.from(this.HTML_FileContentCheerioCapturing("video > source"))) {
|
|
5208
|
+
const $sourceElement = this.HTML_FileContentCheerioCapturing(sourceElement);
|
|
5209
|
+
const srcAttributeValue = $sourceElement.attr("src");
|
|
5210
|
+
if (!(0, es_extensions_1.isNonEmptyString)(srcAttributeValue)) {
|
|
5119
5211
|
continue;
|
|
5120
5212
|
}
|
|
5121
|
-
const
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5213
|
+
const resolvedOutputAbsolutePathOfVideo = this.resolveOutputResourceFileAbsolutePathIfPossible({
|
|
5214
|
+
pickedPathOfTargetResourceFile: srcAttributeValue,
|
|
5215
|
+
prefixOfAliasOfTopDirectoryOfResourcesGroup: videosProcessingConfigRepresentative.
|
|
5216
|
+
prefixOfAliasOfTopDirectoryOfEntryPointsGroup,
|
|
5125
5217
|
sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.createMapBasedOnOtherMap)(videosProcessingConfigRepresentative.assetsGroupsNormalizedSettingsMappedByAssetAliases, (pathAlias, stylesEntryPointsGroupNormalizedSettings) => [pathAlias, stylesEntryPointsGroupNormalizedSettings.sourceFilesTopDirectoryAbsolutePath]),
|
|
5126
5218
|
supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots: videosProcessingConfigRepresentative.supportedSourceFilesNamesExtensionsWithoutLeadingDots,
|
|
5127
5219
|
sourceAndOutputFilesAbsolutePathsCorrespondenceMap: videosProcessingConfigRepresentative.sourceFilesAbsolutePathsAndOutputFilesActualPathsMap,
|
|
5128
|
-
|
|
5220
|
+
fileTypeForLogging__singularForm: videosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM,
|
|
5221
|
+
fileTypeForLogging__pluralForm: videosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
|
|
5129
5222
|
});
|
|
5130
|
-
if ((0, es_extensions_1.isNull)(
|
|
5223
|
+
if ((0, es_extensions_1.isNull)(resolvedOutputAbsolutePathOfVideo)) {
|
|
5131
5224
|
continue;
|
|
5132
5225
|
}
|
|
5133
|
-
$
|
|
5226
|
+
$sourceElement.attr("src", this.buildResourceFileFinalPath({
|
|
5227
|
+
resolvedOutputAbsolutePathOfResourceFile: resolvedOutputAbsolutePathOfVideo,
|
|
5228
|
+
resourceFileType__singularForm: videosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM
|
|
5229
|
+
}));
|
|
5134
5230
|
}
|
|
5135
5231
|
return this;
|
|
5136
5232
|
}
|
|
5137
|
-
/* --- 録音 -------------------------------------------------------------------------------------------------------- */
|
|
5138
5233
|
resolveAudiosPathsAliases() {
|
|
5139
5234
|
if ((0, es_extensions_1.isUndefined)(this.masterConfigRepresentative.audiosProcessingSettingsRepresentative)) {
|
|
5140
5235
|
return this;
|
|
5141
5236
|
}
|
|
5142
5237
|
const audiosProcessingConfigRepresentative = this.masterConfigRepresentative.audiosProcessingSettingsRepresentative;
|
|
5143
|
-
for (const sourceElement of Array.from(this
|
|
5144
|
-
const $
|
|
5145
|
-
const srcAttributeValue = $
|
|
5238
|
+
for (const sourceElement of Array.from(this.HTML_FileContentCheerioCapturing("audio > source"))) {
|
|
5239
|
+
const $sourceElement = this.HTML_FileContentCheerioCapturing(sourceElement);
|
|
5240
|
+
const srcAttributeValue = $sourceElement.attr("src");
|
|
5146
5241
|
if ((0, es_extensions_1.isUndefined)(srcAttributeValue)) {
|
|
5147
5242
|
continue;
|
|
5148
5243
|
}
|
|
5149
|
-
const
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5244
|
+
const resolvedOutputAbsolutePathOfVideo = this.resolveOutputResourceFileAbsolutePathIfPossible({
|
|
5245
|
+
pickedPathOfTargetResourceFile: srcAttributeValue,
|
|
5246
|
+
prefixOfAliasOfTopDirectoryOfResourcesGroup: audiosProcessingConfigRepresentative.
|
|
5247
|
+
prefixOfAliasOfTopDirectoryOfEntryPointsGroup,
|
|
5153
5248
|
sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.createMapBasedOnOtherMap)(audiosProcessingConfigRepresentative.assetsGroupsNormalizedSettingsMappedByAssetAliases, (pathAlias, stylesEntryPointsGroupNormalizedSettings) => [pathAlias, stylesEntryPointsGroupNormalizedSettings.sourceFilesTopDirectoryAbsolutePath]),
|
|
5154
5249
|
supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots: audiosProcessingConfigRepresentative.supportedSourceFilesNamesExtensionsWithoutLeadingDots,
|
|
5155
5250
|
sourceAndOutputFilesAbsolutePathsCorrespondenceMap: audiosProcessingConfigRepresentative.sourceFilesAbsolutePathsAndOutputFilesActualPathsMap,
|
|
5156
|
-
|
|
5251
|
+
fileTypeForLogging__singularForm: audiosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM,
|
|
5252
|
+
fileTypeForLogging__pluralForm: audiosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
|
|
5157
5253
|
});
|
|
5158
|
-
if ((0, es_extensions_1.isNull)(
|
|
5254
|
+
if ((0, es_extensions_1.isNull)(resolvedOutputAbsolutePathOfVideo)) {
|
|
5159
5255
|
continue;
|
|
5160
5256
|
}
|
|
5161
|
-
$
|
|
5257
|
+
$sourceElement.attr("src", this.buildResourceFileFinalPath({
|
|
5258
|
+
resolvedOutputAbsolutePathOfResourceFile: resolvedOutputAbsolutePathOfVideo,
|
|
5259
|
+
resourceFileType__singularForm: audiosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM
|
|
5260
|
+
}));
|
|
5162
5261
|
}
|
|
5163
5262
|
return this;
|
|
5164
5263
|
}
|
|
5165
5264
|
/* --- Helpers ---------------------------------------------------------------------------------------------------- */
|
|
5166
|
-
|
|
5265
|
+
/* eslint-disable-next-line class-methods-use-this --
|
|
5266
|
+
* The method is being used before non-static "buildResourceFileFinalPath", so in this case it has been declared first. */
|
|
5267
|
+
resolveOutputResourceFileAbsolutePathIfPossible({ pickedPathOfTargetResourceFile, prefixOfAliasOfTopDirectoryOfResourcesGroup, sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap, supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots, sourceAndOutputFilesAbsolutePathsCorrespondenceMap, fileTypeForLogging__pluralForm }) {
|
|
5268
|
+
const segmentsOfPickedPath = ImprovedPath_1.default.splitPathToSegments(pickedPathOfTargetResourceFile);
|
|
5269
|
+
const firstSegmentOfPickedPath = segmentsOfPickedPath[0];
|
|
5270
|
+
if ((0, es_extensions_1.isUndefined)(firstSegmentOfPickedPath) ||
|
|
5271
|
+
!firstSegmentOfPickedPath.startsWith(prefixOfAliasOfTopDirectoryOfResourcesGroup)) {
|
|
5272
|
+
return null;
|
|
5273
|
+
}
|
|
5274
|
+
const sourceFilesTopDirectoryAbsolutePathOfCurrentAlias = sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap.get(firstSegmentOfPickedPath);
|
|
5275
|
+
if ((0, es_extensions_1.isUndefined)(sourceFilesTopDirectoryAbsolutePathOfCurrentAlias)) {
|
|
5276
|
+
es_extensions_1.Logger.logWarning(ResourceFilesPathsAliasesResolverForHTML.localization.generateUnknownSourceFileTopDirectoryAliasWarning({
|
|
5277
|
+
fileType__singularForm: fileTypeForLogging__pluralForm,
|
|
5278
|
+
firstPathSegment: firstSegmentOfPickedPath,
|
|
5279
|
+
pickedPathOfTargetResourceFile,
|
|
5280
|
+
formattedSourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(Array.from(sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap.entries()))
|
|
5281
|
+
}));
|
|
5282
|
+
return null;
|
|
5283
|
+
}
|
|
5284
|
+
const sourceFileComputedAbsolutePathPossiblyWithoutFileNameExtension = ImprovedPath_1.default.joinPathSegments(sourceFilesTopDirectoryAbsolutePathOfCurrentAlias, ...segmentsOfPickedPath.slice(1));
|
|
5285
|
+
const explicitlySpecifiedSourceFilenameExtension = ImprovedPath_1.default.
|
|
5286
|
+
extractLastFilenameExtensionWithoutFirstDot(sourceFileComputedAbsolutePathPossiblyWithoutFileNameExtension);
|
|
5287
|
+
if ((0, es_extensions_1.isNull)(explicitlySpecifiedSourceFilenameExtension)) {
|
|
5288
|
+
const possibleAbsolutePathsOfTargetSourceFile = supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots.map((supportedStylesheetFileNameExtensionWithoutLeadingDot) => `${sourceFileComputedAbsolutePathPossiblyWithoutFileNameExtension}.` +
|
|
5289
|
+
`${supportedStylesheetFileNameExtensionWithoutLeadingDot}`);
|
|
5290
|
+
const searchingResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap = (0, es_extensions_1.filterMap)(sourceAndOutputFilesAbsolutePathsCorrespondenceMap, (sourceFileAbsolutePath) => possibleAbsolutePathsOfTargetSourceFile.includes(sourceFileAbsolutePath));
|
|
5291
|
+
if (searchingResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap.size === 0) {
|
|
5292
|
+
es_extensions_1.Logger.logWarning(ResourceFilesPathsAliasesResolverForHTML.localization.
|
|
5293
|
+
generateNoMatchingsForAliasedFilePathWithoutFilenameExtensionWarning({
|
|
5294
|
+
pickedPathOfTargetResourceFile,
|
|
5295
|
+
fileType__singularForm: fileTypeForLogging__pluralForm,
|
|
5296
|
+
checkedAbsolutePaths__formatted: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(possibleAbsolutePathsOfTargetSourceFile)
|
|
5297
|
+
}));
|
|
5298
|
+
return null;
|
|
5299
|
+
}
|
|
5300
|
+
return Array.from(searchingResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap.values())[0];
|
|
5301
|
+
}
|
|
5302
|
+
const resolvedFileOutputAbsolutePath = sourceAndOutputFilesAbsolutePathsCorrespondenceMap.
|
|
5303
|
+
get(sourceFileComputedAbsolutePathPossiblyWithoutFileNameExtension);
|
|
5304
|
+
if ((0, es_extensions_1.isUndefined)(resolvedFileOutputAbsolutePath)) {
|
|
5305
|
+
es_extensions_1.Logger.logWarning(ResourceFilesPathsAliasesResolverForHTML.localization.generateNoOutputFileExistingForSpecifiedSourceFilePath({
|
|
5306
|
+
pickedPathOfTargetResourceFile,
|
|
5307
|
+
fileType__singularForm: fileTypeForLogging__pluralForm
|
|
5308
|
+
}));
|
|
5309
|
+
return null;
|
|
5310
|
+
}
|
|
5311
|
+
return resolvedFileOutputAbsolutePath;
|
|
5312
|
+
}
|
|
5313
|
+
buildResourceFileFinalPath({ resolvedOutputAbsolutePathOfResourceFile, resourceFileType__singularForm }) {
|
|
5167
5314
|
if (this.masterConfigRepresentative.isDevelopmentBuildingMode ||
|
|
5168
5315
|
(0, es_extensions_1.isUndefined)(this.masterConfigRepresentative.actualPublicDirectoryAbsolutePath)) {
|
|
5169
5316
|
if (!this.masterConfigRepresentative.isDevelopmentBuildingMode &&
|
|
5170
5317
|
(0, es_extensions_1.isUndefined)(this.masterConfigRepresentative.actualPublicDirectoryAbsolutePath)) {
|
|
5171
|
-
es_extensions_1.Logger.logWarning({
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
});
|
|
5318
|
+
es_extensions_1.Logger.logWarning(ResourceFilesPathsAliasesResolverForHTML.localization.generateUnableToResolveShortenedAbsolutePathWarning({
|
|
5319
|
+
projectBuildingMode: this.masterConfigRepresentative.consumingProjectBuildingMode,
|
|
5320
|
+
filesType__singularForm: resourceFileType__singularForm
|
|
5321
|
+
}));
|
|
5176
5322
|
}
|
|
5177
5323
|
return ImprovedPath_1.default.computeRelativePath({
|
|
5178
5324
|
basePath: this.compiledHTML_File.outputDirectoryAbsolutePath,
|
|
5179
|
-
comparedPath:
|
|
5325
|
+
comparedPath: resolvedOutputAbsolutePathOfResourceFile
|
|
5180
5326
|
});
|
|
5181
5327
|
}
|
|
5182
5328
|
return `/${ImprovedPath_1.default.computeRelativePath({
|
|
5183
5329
|
basePath: this.masterConfigRepresentative.actualPublicDirectoryAbsolutePath,
|
|
5184
|
-
comparedPath:
|
|
5330
|
+
comparedPath: resolvedOutputAbsolutePathOfResourceFile
|
|
5185
5331
|
})}`;
|
|
5186
5332
|
}
|
|
5187
|
-
static resolveOutputAssetFileAbsolutePathIfPossible({ pickedURL, filePathAliasPrefix, sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap, supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots, sourceAndOutputFilesAbsolutePathsCorrespondenceMap, fileTypeForLogging }) {
|
|
5188
|
-
const pickedURL_Segments = ImprovedPath_1.default.splitPathToSegments(pickedURL);
|
|
5189
|
-
const firstURL_Segment__possiblyPathAlias = pickedURL_Segments[0];
|
|
5190
|
-
if ((0, es_extensions_1.isUndefined)(firstURL_Segment__possiblyPathAlias) ||
|
|
5191
|
-
!firstURL_Segment__possiblyPathAlias.startsWith(filePathAliasPrefix)) {
|
|
5192
|
-
return null;
|
|
5193
|
-
}
|
|
5194
|
-
const sourceFilesTopDirectoryAbsolutePathForCurrentAlias = sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap.get(firstURL_Segment__possiblyPathAlias);
|
|
5195
|
-
if ((0, es_extensions_1.isUndefined)(sourceFilesTopDirectoryAbsolutePathForCurrentAlias)) {
|
|
5196
|
-
es_extensions_1.Logger.logWarning({
|
|
5197
|
-
title: `${fileTypeForLogging}ファイル、不明パスアリアス`,
|
|
5198
|
-
description: `${fileTypeForLogging}ファイルの指定されたパス:「${pickedURL}」に在るアリアス:「${firstURL_Segment__possiblyPathAlias}」` +
|
|
5199
|
-
"該当しているディレクトリが見つけられなかった。下記のアリアスが明示的か、規定で定義してある:\n" +
|
|
5200
|
-
`${(0, es_extensions_1.stringifyAndFormatArbitraryValue)(Array.from(sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap.entries()))}`
|
|
5201
|
-
});
|
|
5202
|
-
return null;
|
|
5203
|
-
}
|
|
5204
|
-
const sourceFileComputedAbsolutePath__possiblyWithoutFilenameExtension = ImprovedPath_1.default.joinPathSegments(sourceFilesTopDirectoryAbsolutePathForCurrentAlias, ...pickedURL_Segments.slice(1));
|
|
5205
|
-
const explicitlySpecifiedSourceFilenameExtension = ImprovedPath_1.default.
|
|
5206
|
-
extractLastFilenameExtensionWithoutFirstDot(sourceFileComputedAbsolutePath__possiblyWithoutFilenameExtension);
|
|
5207
|
-
if ((0, es_extensions_1.isNull)(explicitlySpecifiedSourceFilenameExtension)) {
|
|
5208
|
-
const sourceFilesPossibleAbsolutePaths = supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots.map((supportedStylesheetFileNameExtensionWithoutDot) => `${sourceFileComputedAbsolutePath__possiblyWithoutFilenameExtension}.` +
|
|
5209
|
-
`${supportedStylesheetFileNameExtensionWithoutDot}`);
|
|
5210
|
-
const searchResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap = (0, es_extensions_1.filterMap)(sourceAndOutputFilesAbsolutePathsCorrespondenceMap, (sourceFileAbsolutePath) => sourceFilesPossibleAbsolutePaths.includes(sourceFileAbsolutePath));
|
|
5211
|
-
if (searchResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap.size === 0) {
|
|
5212
|
-
es_extensions_1.Logger.logWarning({
|
|
5213
|
-
title: `${fileTypeForLogging}ファイル、不明パスアリアス`,
|
|
5214
|
-
description: `${fileTypeForLogging}ファイル:「${pickedURL}」に在るアリアス:${firstURL_Segment__possiblyPathAlias}に` +
|
|
5215
|
-
"該当する出力ファイルが見つけられなかった。"
|
|
5216
|
-
});
|
|
5217
|
-
return null;
|
|
5218
|
-
}
|
|
5219
|
-
else if (searchResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap.size > 1) {
|
|
5220
|
-
es_extensions_1.Logger.logWarning({
|
|
5221
|
-
title: `${fileTypeForLogging}ファイル、漠然パスアリアス`,
|
|
5222
|
-
description: `${fileTypeForLogging}ファイル:「${pickedURL}」に在るアリアス:${firstURL_Segment__possiblyPathAlias}は複数` +
|
|
5223
|
-
`のファイルに該当している:\n${(0, es_extensions_1.stringifyAndFormatArbitraryValue)(Array.from(searchResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap.values()))}\n其の場合は、源ファイルのファイル名拡張子を明示的に指定するのが必要。`
|
|
5224
|
-
});
|
|
5225
|
-
return null;
|
|
5226
|
-
}
|
|
5227
|
-
return Array.from(searchResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap.values())[0];
|
|
5228
|
-
}
|
|
5229
|
-
const resolvedStylesheetOutputAbsolutePath = sourceAndOutputFilesAbsolutePathsCorrespondenceMap.get(sourceFileComputedAbsolutePath__possiblyWithoutFilenameExtension);
|
|
5230
|
-
if ((0, es_extensions_1.isUndefined)(resolvedStylesheetOutputAbsolutePath)) {
|
|
5231
|
-
es_extensions_1.Logger.logWarning({
|
|
5232
|
-
title: `${fileTypeForLogging}ファイル、不明パスアリアス`,
|
|
5233
|
-
description: `${fileTypeForLogging}ファイル:「${pickedURL}」に在るアリアス:${firstURL_Segment__possiblyPathAlias}に` +
|
|
5234
|
-
"該当する出力ファイルが見つけられなかった。"
|
|
5235
|
-
});
|
|
5236
|
-
return null;
|
|
5237
|
-
}
|
|
5238
|
-
return resolvedStylesheetOutputAbsolutePath;
|
|
5239
|
-
}
|
|
5240
5333
|
}
|
|
5241
|
-
exports["default"] =
|
|
5334
|
+
exports["default"] = ResourceFilesPathsAliasesResolverForHTML;
|
|
5242
5335
|
|
|
5243
5336
|
|
|
5244
5337
|
/***/ }),
|
|
@@ -5258,7 +5351,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
5258
5351
|
const HTML_ValidatorLocalization_english_1 = __importDefault(__webpack_require__(/*! ./HTML_ValidatorLocalization.english */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_ValidatorLocalization.english.ts"));
|
|
5259
5352
|
/* --- Applied utils ------------------------------------------------------------------------------------------------ */
|
|
5260
5353
|
const html_validator_1 = __importDefault(__webpack_require__(/*! html-validator */ "html-validator"));
|
|
5261
|
-
const
|
|
5354
|
+
const getExpectedToBeNonNullStringifiedContentOfVinylFile_1 = __importDefault(__webpack_require__(/*! @Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile */ "./Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile.ts"));
|
|
5262
5355
|
const isCompiledHTML_ContentEmpty_1 = __importDefault(__webpack_require__(/*! @Utils/isCompiledHTML_ContentEmpty */ "./Utils/isCompiledHTML_ContentEmpty.ts"));
|
|
5263
5356
|
const node_notifier_1 = __importDefault(__webpack_require__(/*! node-notifier */ "node-notifier"));
|
|
5264
5357
|
/* --- General utils ------------------------------------------------------------------------------------------------ */
|
|
@@ -5268,7 +5361,7 @@ const Stopwatch_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/Stop
|
|
|
5268
5361
|
class HTML_Validator {
|
|
5269
5362
|
static localization = HTML_ValidatorLocalization_english_1.default;
|
|
5270
5363
|
static validateHTML(compiledHTML_File, masterConfigRepresentative) {
|
|
5271
|
-
const extractedHTML_Code = (0,
|
|
5364
|
+
const extractedHTML_Code = (0, getExpectedToBeNonNullStringifiedContentOfVinylFile_1.default)(compiledHTML_File);
|
|
5272
5365
|
const targetFileRelativePath = ImprovedPath_1.default.computeRelativePath({
|
|
5273
5366
|
basePath: masterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath,
|
|
5274
5367
|
comparedPath: compiledHTML_File.path
|
|
@@ -5399,7 +5492,7 @@ const HTML_ValidatorLocalization__English = {
|
|
|
5399
5492
|
grossViolation: "Gross violation",
|
|
5400
5493
|
recommendationDisregard: "Recommendation disregard",
|
|
5401
5494
|
other: "Other issue",
|
|
5402
|
-
keyAndValueSeparator: ":"
|
|
5495
|
+
keyAndValueSeparator: ": "
|
|
5403
5496
|
},
|
|
5404
5497
|
generateIssuesFoundErrorLog: (namedParameters) => ({
|
|
5405
5498
|
customBadgeText: "HTML validation not passed",
|
|
@@ -5428,12 +5521,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5428
5521
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5429
5522
|
};
|
|
5430
5523
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5431
|
-
const
|
|
5524
|
+
const getExpectedToBeNonNullStringifiedContentOfVinylFile_1 = __importDefault(__webpack_require__(/*! @Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile */ "./Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile.ts"));
|
|
5432
5525
|
const cheerio_1 = __importDefault(__webpack_require__(/*! cheerio */ "cheerio"));
|
|
5433
5526
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
5434
5527
|
function removeExtraSpacesFromJapaneseText(compiledHTML_File) {
|
|
5435
5528
|
const $HTML_FileContentCheerioCapturing = cheerio_1.default.
|
|
5436
|
-
load((0,
|
|
5529
|
+
load((0, getExpectedToBeNonNullStringifiedContentOfVinylFile_1.default)(compiledHTML_File), { decodeEntities: false });
|
|
5437
5530
|
for (const targetElement of Array.from($HTML_FileContentCheerioCapturing("p"))) {
|
|
5438
5531
|
const $TargetElement = $HTML_FileContentCheerioCapturing(targetElement);
|
|
5439
5532
|
const targetElementHTML = $TargetElement.html();
|
|
@@ -5589,7 +5682,10 @@ const ImprovedPath_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/I
|
|
|
5589
5682
|
const PoliteErrorsMessagesBuilder_1 = __importDefault(__webpack_require__(/*! @Utils/PoliteErrorsMessagesBuilder */ "./Utils/PoliteErrorsMessagesBuilder.ts"));
|
|
5590
5683
|
class StylesProcessingSettingsRepresentative extends GulpStreamBasedSourceCodeProcessingConfigRepresentative_1.default {
|
|
5591
5684
|
static #localization = {
|
|
5592
|
-
|
|
5685
|
+
targetFilesType: {
|
|
5686
|
+
singularForm: "stylesheet",
|
|
5687
|
+
pluralForm: "stylesheets"
|
|
5688
|
+
},
|
|
5593
5689
|
errorsMessagesData: {
|
|
5594
5690
|
unableToDecideMustFileBePrecessedByStylusPreProcessorBecauseFileNameExtensionIsMissing: {
|
|
5595
5691
|
generateTechnicalDetails({ filePath }) {
|
|
@@ -5616,9 +5712,12 @@ class StylesProcessingSettingsRepresentative extends GulpStreamBasedSourceCodePr
|
|
|
5616
5712
|
}
|
|
5617
5713
|
};
|
|
5618
5714
|
supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots;
|
|
5715
|
+
TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM = StylesProcessingSettingsRepresentative.#localization.
|
|
5716
|
+
targetFilesType.singularForm;
|
|
5619
5717
|
TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = StylesProcessingSettingsRepresentative.#localization.
|
|
5620
|
-
|
|
5718
|
+
targetFilesType.pluralForm;
|
|
5621
5719
|
waitingForTheOtherFilesWillBeSavedPeriod__seconds;
|
|
5720
|
+
prefixOfAliasOfTopDirectoryOfEntryPointsGroup = "@";
|
|
5622
5721
|
sourceCodeLintingCommonSettings;
|
|
5623
5722
|
sourceAndOutputFilesAbsolutePathsCorrespondenceMap = new Map();
|
|
5624
5723
|
relevantEntryPointsGroupsSettings;
|
|
@@ -5907,7 +6006,7 @@ class StylesProcessor extends GulpStreamsBasedSourceCodeProcessor_1.default {
|
|
|
5907
6006
|
fileInInitialState.processingSettings = normalizedStylesEntryPointsGroupSettingsActualForCurrentFile;
|
|
5908
6007
|
/* [ Theory ] The value of 'path' could change during file processing. */
|
|
5909
6008
|
fileInInitialState.sourceAbsolutePath = ImprovedPath_1.default.replacePathSeparatorsToForwardSlashes(fileInInitialState.path);
|
|
5910
|
-
fileInInitialState.outputDirectoryAbsolutePath =
|
|
6009
|
+
fileInInitialState.outputDirectoryAbsolutePath = StylesProcessingSettingsRepresentative_1.default.
|
|
5911
6010
|
computeRelevantOutputDirectoryAbsolutePathForTargetSourceFile(fileInInitialState.path, normalizedStylesEntryPointsGroupSettingsActualForCurrentFile);
|
|
5912
6011
|
fileInInitialState.mustBeProcessedByStylus = StylesProcessingSettingsRepresentative_1.default.
|
|
5913
6012
|
mustFileBeProcessedByStylus(fileInInitialState.path);
|
|
@@ -6851,21 +6950,21 @@ exports["default"] = PoliteErrorsMessagesBuilder;
|
|
|
6851
6950
|
|
|
6852
6951
|
/***/ }),
|
|
6853
6952
|
|
|
6854
|
-
/***/ "./Utils/
|
|
6855
|
-
|
|
6856
|
-
!*** ./Utils/
|
|
6857
|
-
|
|
6953
|
+
/***/ "./Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile.ts":
|
|
6954
|
+
/*!**********************************************************************!*\
|
|
6955
|
+
!*** ./Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile.ts ***!
|
|
6956
|
+
\**********************************************************************/
|
|
6858
6957
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
6859
6958
|
|
|
6860
6959
|
|
|
6861
6960
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6862
6961
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
6863
|
-
function
|
|
6962
|
+
function getExpectedToBeNonNullStringifiedContentOfVinylFile(targetFile) {
|
|
6864
6963
|
if (targetFile.contents === null) {
|
|
6865
6964
|
es_extensions_1.Logger.throwErrorAndLog({
|
|
6866
6965
|
errorInstance: new es_extensions_1.UnexpectedEventError(`目標的Vinylファイル:「${targetFile.path}」の'contents'プロパティは'null'と成っている。`),
|
|
6867
6966
|
title: es_extensions_1.UnexpectedEventError.localization.defaultTitle,
|
|
6868
|
-
occurrenceLocation: "
|
|
6967
|
+
occurrenceLocation: "extractExpectedToBeNonNullStringifiedContentFromVinylFile(targetFile)",
|
|
6869
6968
|
additionalData: targetFile
|
|
6870
6969
|
});
|
|
6871
6970
|
}
|
|
@@ -6873,13 +6972,13 @@ function extractStringifiedContentFromVinylFile(targetFile) {
|
|
|
6873
6972
|
es_extensions_1.Logger.throwErrorAndLog({
|
|
6874
6973
|
errorInstance: new es_extensions_1.UnexpectedEventError(`目標的Vinylファイル:「${targetFile.path}」の'contents'プロパティは'Buffer'のインスタンスではない為、内容を抽出出来ません。`),
|
|
6875
6974
|
title: es_extensions_1.UnexpectedEventError.localization.defaultTitle,
|
|
6876
|
-
occurrenceLocation: "
|
|
6975
|
+
occurrenceLocation: "extractExpectedToBeNonNullStringifiedContentFromVinylFile(targetFile)",
|
|
6877
6976
|
additionalData: targetFile
|
|
6878
6977
|
});
|
|
6879
6978
|
}
|
|
6880
6979
|
return targetFile.contents.toString();
|
|
6881
6980
|
}
|
|
6882
|
-
exports["default"] =
|
|
6981
|
+
exports["default"] = getExpectedToBeNonNullStringifiedContentOfVinylFile;
|
|
6883
6982
|
|
|
6884
6983
|
|
|
6885
6984
|
/***/ }),
|
package/README.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Yamato Daiwa Automation 〔YDA〕
|
|
2
|
+
|
|
3
|
+
The project building tool with declarative YAML configuration based on Gulp and Webpack.
|
|
4
|
+
Specializing on Pug, Stylus and TypeScript as source code languages; also works with images, fonts, videos and audios.
|
|
5
|
+
|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
[📖 Documentation](https://github.com/TokugawaTakeshi/Yamato-Daiwa-Automation/blob/master/README.md)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
npm i @yamato-daiwa/automation -D -E
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Dependencies list
|
|
19
|
+
|
|
20
|
+
<dl>
|
|
21
|
+
|
|
22
|
+
<dt>@vue/compiler-sfc, vue, vue-loader</dt>
|
|
23
|
+
<dd>Used to provide the support of Vue Single File Components for ECMAScript logic processing</dd>
|
|
24
|
+
|
|
25
|
+
<dt>@yamato-daiwa/es-extensions, @yamato-daiwa/es-extensions-nodejs</dt>
|
|
26
|
+
<dd>Used to reduce the routine code</dd>
|
|
27
|
+
|
|
28
|
+
<dt>@yamato-daiwa/style_guides</dt>
|
|
29
|
+
<dd>The code style guides to which this project obeying and also suggested for the consuming project</dd>
|
|
30
|
+
|
|
31
|
+
<dt>autoprefixer</dt>
|
|
32
|
+
<dd>Used for adding of the vendor prefixes to CSS properties in processed stylesheets the better cross-browser adaptations</dd>
|
|
33
|
+
|
|
34
|
+
<dt>browser-sync</dt>
|
|
35
|
+
<dd>Used to provide the automation of browser opening and reloading when project incrementally rebuilt</dd>
|
|
36
|
+
|
|
37
|
+
<dt>cheerio</dt>
|
|
38
|
+
<dd>Used for manipulation with compiled HTML code like resolving of paths aliases</dd>
|
|
39
|
+
|
|
40
|
+
<dt>css-loader</dt>
|
|
41
|
+
<dd>Used to provide the imports of stylesheets to ECMAScript bundles</dd>
|
|
42
|
+
|
|
43
|
+
<dt>cssnano</dt>
|
|
44
|
+
<dd>Used to provide optimization and minification of compiled CSS code</dd>
|
|
45
|
+
|
|
46
|
+
<dt>eslint-webpack-plugin</dt>
|
|
47
|
+
<dd>Used to provide the ESLint inspection with output to terminal during processing of ECMAScript logic</dd>
|
|
48
|
+
|
|
49
|
+
<dt>fork-ts-checker-webpack-plugin</dt>
|
|
50
|
+
<dd>Used to improve the performance of TypeScript transpiling functionality</dd>
|
|
51
|
+
|
|
52
|
+
<dt>gulp</dt>
|
|
53
|
+
<dd>Used as main task manager, the tool for providing of arranging of the tasks to sequences and series and running them</dd>
|
|
54
|
+
|
|
55
|
+
<dt>gulp-debug</dt>
|
|
56
|
+
<dd>Used to outputs the processed files names and quantity to the terminal</dd>
|
|
57
|
+
|
|
58
|
+
<dt>gulp-html-prettify</dt>
|
|
59
|
+
<dd>Used to provide the formatting of output HTML code better than suggested by Pug pre-processor</dd>
|
|
60
|
+
|
|
61
|
+
<dt>gulp-if</dt>
|
|
62
|
+
<dd>Used for providing of conditional processing according to various settings</dd>
|
|
63
|
+
|
|
64
|
+
<dt>gulp-imagemin</dt>
|
|
65
|
+
<dd>Used to provide the automation of images files optimization</dd>
|
|
66
|
+
|
|
67
|
+
<dt>gulp-intercept</dt>
|
|
68
|
+
<dd>Used for defining of configuration-dependent logic inside Gulp pipelines</dd>
|
|
69
|
+
|
|
70
|
+
<dt>gulp-plumber</dt>
|
|
71
|
+
<dd>Used for errors handing inside Gulp pipelines</dd>
|
|
72
|
+
|
|
73
|
+
<dt>gulp-postcss</dt>
|
|
74
|
+
<dd>Used to provide the post-processing of CSS code with PostCSS plugins</dd>
|
|
75
|
+
|
|
76
|
+
<dt>gulp-pug</dt>
|
|
77
|
+
<dd>Used to provide the basic Pug-to-HTML transpiling</dd>
|
|
78
|
+
|
|
79
|
+
<dt>gulp-stylus</dt>
|
|
80
|
+
<dd>Used to provide the basic Stylus-to-CSS transpiling</dd>
|
|
81
|
+
|
|
82
|
+
<dt>html-loader</dt>
|
|
83
|
+
<dd>Used to provide the import of HTML code as string to JavaScript bundle</dd>
|
|
84
|
+
|
|
85
|
+
<dt>html-validator</dt>
|
|
86
|
+
<dd>Used to get the HTML validation data from W3C service. The formatted output to terminal has been implemented by YDA development side.</dd>
|
|
87
|
+
|
|
88
|
+
<dt>imagemin-pngquant</dt>
|
|
89
|
+
<dd>Used to provides the optimization of PNG files</dd>
|
|
90
|
+
|
|
91
|
+
<dt>json5-loader</dt>
|
|
92
|
+
<dd>Used to provide the imports of JSON5 as ECMAScript native object to JavaScript bundle</dd>
|
|
93
|
+
|
|
94
|
+
<dt>node-notifier</dt>
|
|
95
|
+
<dd>Used for accessing to native toast message functionality</dd>
|
|
96
|
+
|
|
97
|
+
<dt>pug-plain-loader</dt>
|
|
98
|
+
<dd>Used to providing of the Pug source code language for Vue templates in Single File Components</dd>
|
|
99
|
+
|
|
100
|
+
<dt>pug-html-loader</dt>
|
|
101
|
+
<dd>
|
|
102
|
+
Used in combination with <b>html-loader</b> to provide the importing of HTML code compiled from Pug language as string
|
|
103
|
+
to JavaScript bundle
|
|
104
|
+
</dd>
|
|
105
|
+
|
|
106
|
+
<dt>rev-hash</dt>
|
|
107
|
+
<dd>
|
|
108
|
+
Used for generating of file content dependent postfixes to prevent the outdated stylesheets, scripts etc.
|
|
109
|
+
because of browser caching (thus actual for the Browser runtime only).
|
|
110
|
+
</dd>
|
|
111
|
+
|
|
112
|
+
<dt>stlint</dt>
|
|
113
|
+
<dd>Used for linting of styles written by Stylus. The formatted output to terminal has been implemented by YDA development side.</dd>
|
|
114
|
+
|
|
115
|
+
<dt>style-loader</dt>
|
|
116
|
+
<dd>Used to provide the dynamic injection of CSS functionality which has been imported to JavaScript bundle built by Webpack</dd>
|
|
117
|
+
|
|
118
|
+
<dt>stylus-loader</dt>
|
|
119
|
+
<dd>
|
|
120
|
+
Used to provide the dynamic loading of CSS witten by Stylus pre-processor which has been imported to JavaScript
|
|
121
|
+
bundle built by Webpack
|
|
122
|
+
</dd>
|
|
123
|
+
|
|
124
|
+
<dt>ts-loader</dt>
|
|
125
|
+
<dd>Used to provide the integration of TypeScript and Webpack</dd>
|
|
126
|
+
|
|
127
|
+
<dt>vinyl</dt>
|
|
128
|
+
<dd>
|
|
129
|
+
Used to create new Gulp plugins.
|
|
130
|
+
Although this package is being installed indirectly, the importing of this package without manual installing will cause
|
|
131
|
+
"node/no-extraneous-import" ESLint issue and there is no reason to mute it.
|
|
132
|
+
</dd>
|
|
133
|
+
|
|
134
|
+
<dt>vue-style-loader</dt>
|
|
135
|
+
<dd>Used to provide the dynamical loading of CSS written in Vue Single File Components to HTML document</dd>
|
|
136
|
+
|
|
137
|
+
<dt>webpack</dt>
|
|
138
|
+
<dd>Used as basic tool for the ECMAScript logic processing</dd>
|
|
139
|
+
|
|
140
|
+
<dt>webpack-node-externals</dt>
|
|
141
|
+
<dd>
|
|
142
|
+
Used to prevent the bundling of NodeJS modules by Webpack because this bundling brings a lot of warning and/or errors
|
|
143
|
+
while not required for console and server applications
|
|
144
|
+
</dd>
|
|
145
|
+
|
|
146
|
+
<dt>yamljs</dt>
|
|
147
|
+
<dd>Used for reading and parsing of configuration YAML files</dd>
|
|
148
|
+
|
|
149
|
+
<dt>yaml-loader</dt>
|
|
150
|
+
<dd>Used to provide the import of content of YAML files converted to JavaScript native object</dd>
|
|
151
|
+
|
|
152
|
+
</dl>
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
### For development needs only
|
|
156
|
+
|
|
157
|
+
All **@types** are the TypeScript types definitions that required for normal transpiling of the TypeScript to JavaScript (Node.js).
|
|
158
|
+
|
|
159
|
+
<dl>
|
|
160
|
+
|
|
161
|
+
<dt>ts-node</dt>
|
|
162
|
+
<dd>Used to support the Webpack configuration written by TypeScript</dd>
|
|
163
|
+
|
|
164
|
+
<dt>typescript</dt>
|
|
165
|
+
<dd>Used to provide the TypeScript as source code language</dd>
|
|
166
|
+
|
|
167
|
+
<dt>webpack-cli</dt>
|
|
168
|
+
<dd>Used for the project building</dd>
|
|
169
|
+
|
|
170
|
+
</dl>
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
### Temporary dependencies
|
|
174
|
+
|
|
175
|
+
<dl>
|
|
176
|
+
|
|
177
|
+
<dt>glob</dt>
|
|
178
|
+
<dd>Used by <b>ImprovedGlob</b> which will be moved to <b>@yamato-daiwa/es-extensions-nodejs</b> and used as dependency </dd>
|
|
179
|
+
|
|
180
|
+
<dt>minimatch</dt>
|
|
181
|
+
<dd>used by <b>ImprovedGlob</b> which will be moved to <b>@yamato-daiwa/es-extensions-nodejs</b> and used as dependency </dd>
|
|
182
|
+
|
|
183
|
+
</dl>
|
package/package.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamato-daiwa/automation",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"description": "The project building tool with declarative YAML configuration specializing on Pug, Stylus and TypeScript as source code languages.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"build",
|
|
7
|
+
"pug",
|
|
8
|
+
"stylus",
|
|
9
|
+
"tool",
|
|
10
|
+
"typescript"
|
|
11
|
+
],
|
|
4
12
|
"engines": {
|
|
5
13
|
"node": ">=14.16"
|
|
6
14
|
},
|
|
@@ -11,19 +19,19 @@
|
|
|
11
19
|
"EntryPoint.js"
|
|
12
20
|
],
|
|
13
21
|
"dependencies": {
|
|
14
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
15
|
-
"@typescript-eslint/parser": "5.
|
|
16
|
-
"@vue/compiler-sfc": "3.2.
|
|
17
|
-
"@yamato-daiwa/es-extensions": "1.5.
|
|
18
|
-
"@yamato-daiwa/es-extensions-nodejs": "1.5.0
|
|
19
|
-
"@yamato-daiwa/style_guides": "0.0.
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "5.30.5",
|
|
23
|
+
"@typescript-eslint/parser": "5.30.5",
|
|
24
|
+
"@vue/compiler-sfc": "3.2.37",
|
|
25
|
+
"@yamato-daiwa/es-extensions": "1.5.1",
|
|
26
|
+
"@yamato-daiwa/es-extensions-nodejs": "1.5.0",
|
|
27
|
+
"@yamato-daiwa/style_guides": "0.0.16",
|
|
20
28
|
"access-sniff": "3.2.0",
|
|
21
29
|
"autoprefixer": "10.4.7",
|
|
22
30
|
"browser-sync": "2.27.10",
|
|
23
31
|
"cheerio": "1.0.0-rc.1",
|
|
24
32
|
"css-loader": "6.7.1",
|
|
25
33
|
"cssnano": "5.1.10",
|
|
26
|
-
"eslint": "8.
|
|
34
|
+
"eslint": "8.19.0",
|
|
27
35
|
"eslint-plugin-import": "2.26.0",
|
|
28
36
|
"eslint-plugin-node": "11.1.0",
|
|
29
37
|
"eslint-webpack-plugin": "3.1.1",
|
|
@@ -43,8 +51,8 @@
|
|
|
43
51
|
"html-loader": "3.1.0",
|
|
44
52
|
"html-validator": "6.0.1",
|
|
45
53
|
"imagemin-pngquant": "9.0.2",
|
|
46
|
-
"json5": "2.2.1",
|
|
47
54
|
"json5-loader": "4.0.1",
|
|
55
|
+
"minimatch": "5.1.0",
|
|
48
56
|
"node-notifier": "10.0.1",
|
|
49
57
|
"pug-html-loader": "1.1.5",
|
|
50
58
|
"pug-plain-loader": "1.1.0",
|
|
@@ -53,10 +61,11 @@
|
|
|
53
61
|
"style-loader": "3.3.1",
|
|
54
62
|
"stylus-loader": "6.2.0",
|
|
55
63
|
"ts-loader": "9.3.0",
|
|
56
|
-
"
|
|
64
|
+
"vinyl": "2.2.1",
|
|
65
|
+
"vue": "3.2.37",
|
|
57
66
|
"vue-loader": "17.0.0",
|
|
58
67
|
"vue-style-loader": "4.1.3",
|
|
59
|
-
"webpack": "5.
|
|
68
|
+
"webpack": "5.73.0",
|
|
60
69
|
"webpack-node-externals": "3.0.0",
|
|
61
70
|
"worker-loader": "3.0.8",
|
|
62
71
|
"yaml-loader": "0.8.0",
|
|
@@ -82,9 +91,9 @@
|
|
|
82
91
|
"@types/node-notifier": "8.0.2",
|
|
83
92
|
"@types/webpack-node-externals": "2.5.3",
|
|
84
93
|
"@types/yamljs": "0.2.31",
|
|
85
|
-
"ts-node": "10.8.
|
|
86
|
-
"typescript": "4.7.
|
|
87
|
-
"webpack-cli": "4.
|
|
94
|
+
"ts-node": "10.8.1",
|
|
95
|
+
"typescript": "4.7.4",
|
|
96
|
+
"webpack-cli": "4.10.0"
|
|
88
97
|
},
|
|
89
98
|
"scripts": {
|
|
90
99
|
"Incremental development build": "webpack --mode development",
|