From 1ecfaf3bbb44083646c3050816f9b00b050ff399 Mon Sep 17 00:00:00 2001 From: Marco 'Lubber' Wienkoop Date: Thu, 26 Dec 2024 18:39:12 +0100 Subject: [PATCH] feat(build): customizable output filename Support a custom filename instead of hardcoded "semantic" (which is still default). This also prepares for a later change for the default from "semantic" to "fomantic" and a quicker fallback --- semantic.json.example | 2 +- tasks/config/defaults.js | 2 ++ tasks/config/tasks.js | 12 ++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/semantic.json.example b/semantic.json.example index 6d67666e5a..8f27aebff6 100644 --- a/semantic.json.example +++ b/semantic.json.example @@ -16,7 +16,7 @@ }, "clean" : "dist/" }, - + "fileName" : "semantic", "permission" : false, "autoInstall": false, "rtl": false diff --git a/tasks/config/defaults.js b/tasks/config/defaults.js index 41844c7baf..d1c4195c62 100644 --- a/tasks/config/defaults.js +++ b/tasks/config/defaults.js @@ -125,4 +125,6 @@ module.exports = { ignoredRTL: '!(*.min|*.map)', }, + fileName: 'semantic', + }; diff --git a/tasks/config/tasks.js b/tasks/config/tasks.js index 050db04101..15f0967f03 100644 --- a/tasks/config/tasks.js +++ b/tasks/config/tasks.js @@ -40,12 +40,12 @@ module.exports = { }, filenames: { - concatenatedCSS: 'semantic' + release.versionInFileName + '.css', - concatenatedJS: 'semantic' + release.versionInFileName + '.js', - concatenatedMinifiedCSS: 'semantic' + release.versionInFileName + '.min.css', - concatenatedMinifiedJS: 'semantic' + release.versionInFileName + '.min.js', - concatenatedRTLCSS: 'semantic' + release.versionInFileName + '.rtl.css', - concatenatedMinifiedRTLCSS: 'semantic' + release.versionInFileName + '.rtl.min.css', + concatenatedCSS: config.fileName + release.versionInFileName + '.css', + concatenatedJS: config.fileName + release.versionInFileName + '.js', + concatenatedMinifiedCSS: config.fileName + release.versionInFileName + '.min.css', + concatenatedMinifiedJS: config.fileName + release.versionInFileName + '.min.js', + concatenatedRTLCSS: config.fileName + release.versionInFileName + '.rtl.css', + concatenatedMinifiedRTLCSS: config.fileName + release.versionInFileName + '.rtl.min.css', }, regExp: {