diff --git a/.prettierignore b/.prettierignore index 619caf5..ebb21b2 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,4 +3,6 @@ module.json **/*.js **/*.cjs -**/*.mjs \ No newline at end of file +**/*.mjs +**/fonts.css +**/_fonts.scss \ No newline at end of file diff --git a/gulpfile.mjs b/gulpfile.mjs index 068a366..0ed1d18 100644 --- a/gulpfile.mjs +++ b/gulpfile.mjs @@ -28,7 +28,7 @@ const distDirectory = "./dist"; const stylesDirectory = `${sourceDirectory}/styles`; const stylesExtension = "scss"; const sourceFileExtension = "js"; -const staticFiles = ["assets", "fonts", "lang", "lib", "packs", "templates", "module.json"]; +const staticFiles = ["assets", "fonts", "lang", "lib", "packs", "styles/fonts.css", "templates", "module.json"]; /********************/ /* BUILD */ @@ -57,7 +57,7 @@ function buildCode() { function buildStyles() { return gulp.src([`${stylesDirectory}/**/*.${stylesExtension}`], { base: `${stylesDirectory}/` }) .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(sass({ outputStyle: "expanded" }).on("error", sass.logError)) + .pipe(sass({ outputStyle: "compressed" }).on("error", sass.logError)) .pipe(prefix({ cascade: false })) .pipe(sourcemaps.write(".")) .pipe(gulp.dest(`${distDirectory}/styles`)); @@ -102,11 +102,7 @@ export const build = gulp.series(clean, gulp.parallel(buildCode, buildStyles, se * Remove built files from `dist` folder while ignoring source files */ export async function clean() { - const files = [...staticFiles, "module"]; - - if (fs.existsSync(`${stylesDirectory}/${packageId}.${stylesExtension}`)) { - files.push("styles"); - } + const files = [...staticFiles, "styles", "module"]; console.log(" ", "Files to clean:"); console.log(" ", files.join("\n ")); diff --git a/src/module.json b/src/module.json index d1bcc72..55f07be 100644 --- a/src/module.json +++ b/src/module.json @@ -15,7 +15,7 @@ }, "esmodules": ["module/polyglot.js"], "scripts": ["lib/select2/select2.min.js"], - "styles": ["lib/select2/select2.min.css", "styles/polyglot.css"], + "styles": ["lib/select2/select2.min.css", "styles/fonts.css", "styles/polyglot.css"], "languages": [ { "lang": "en", diff --git a/src/styles/_fonts.scss b/src/styles/_fonts.scss deleted file mode 100644 index 0a0977f..0000000 --- a/src/styles/_fonts.scss +++ /dev/null @@ -1,184 +0,0 @@ -@font-face { - font-family: "ArCiela"; - src: url("../fonts/ArCiela.ttf"); -} -@font-face { - font-family: "Aztec"; - src: url("../fonts/Aztec.ttf"); -} -@font-face { - font-family: "Barazhad"; - src: url("../fonts/Barazhad.otf"); -} -@font-face { - font-family: "Celestial"; - src: url("../fonts/Celestial.ttf"); -} -@font-face { - font-family: "Daedra"; - src: url("../fonts/Daedra.otf"); -} -@font-face { - font-family: "DarkEldar"; - src: url("../fonts/DarkEldar.ttf"); -} -@font-face { - font-family: "Davek"; - src: url("../fonts/Davek.otf"); -} -@font-face { - font-family: "Dethek"; - src: url("../fonts/Dethek.otf"); -} -@font-face { - font-family: "DragonAlphabet"; - src: url("../fonts/dragon_alphabet.ttf"); -} -@font-face { - font-family: "ElderFuthark"; - src: url("../fonts/ElderFutharkFS.ttf"); -} -@font-face { - font-family: "Eltharin"; - src: url("../fonts/Eltharin.ttf"); -} -@font-face { - font-family: "Espruar"; - src: url("../fonts/Espruar.otf"); -} -@font-face { - font-family: "Floki"; - src: url("../fonts/Floki.ttf"); -} -@font-face { - font-family: "FingerAlphabet"; - src: url("../fonts/FingerAlphabet.ttf"); -} -@font-face { - font-family: "HighDrowic"; - src: url("../fonts/HighDrowic.otf"); -} -@font-face { - font-family: "HighschoolRunes"; - src: url("../fonts/HighschoolRunes.ttf"); -} -@font-face { - font-family: "Infernal"; - src: url("../fonts/Infernal.ttf"); -} -@font-face { - font-family: "Iokharic"; - src: url("../fonts/Iokharic.otf"); -} -@font-face { - font-family: "JungleSlang"; - src: url("../fonts/JungleSlang.ttf"); -} -@font-face { - font-family: "Kargi"; - src: url("../fonts/Kargi.ttf"); -} -@font-face { - font-family: "KremlinPremier"; - src: url("../fonts/KremlinPremier.ttf"); -} -@font-face { - font-family: "MageScript"; - src: url("../fonts/MageScript.otf"); -} -@font-face { - font-family: "MarasEye"; - src: url("../fonts/MarasEye.otf"); -} -@font-face { - font-family: "MeroiticDemotic"; - src: url("../fonts/MeroiticDemotic.ttf"); -} -@font-face { - font-family: "MiroslavNormal"; - src: url("../fonts/MiroslavNormal.ttf"); -} -@font-face { - font-family: "MusiQwik"; - src: url("../fonts/MusiQwik.ttf"); -} -@font-face { - font-family: "NyStormning"; - src: url("../fonts/NyStormning.otf"); -} -@font-face { - font-family: "OldeEnglish"; - src: url("../fonts/OldeEnglish.ttf"); -} -@font-face { - font-family: "OldeEspruar"; - src: url("../fonts/OldeEspruar.otf"); -} -@font-face { - font-family: "OldeThorass"; - src: url("../fonts/OldeThorass.otf"); -} -@font-face { - font-family: "Ophidian"; - src: url("../fonts/Ophidian.otf"); -} -@font-face { - font-family: "Pulsian"; - src: url("../fonts/Pulsian.ttf"); -} -@font-face { - font-family: "Oriental"; - src: url("../fonts/Oriental.ttf"); -} -@font-face { - font-family: "OrkGlyphs"; - src: url("../fonts/OrkGlyphs.ttf"); -} -@font-face { - font-family: "Qijomi"; - src: url("../fonts/Qijomi.otf"); -} -@font-face { - font-family: "Reanaarian"; - src: url("../fonts/Reanaarian.otf"); -} -@font-face { - font-family: "Rellanic"; - src: url("../fonts/Rellanic.otf"); -} -@font-face { - font-family: "Saurian"; - src: url("../fonts/Saurian.ttf"); -} -@font-face { - font-family: "ScrapbookChinese"; - src: url("../fonts/ScrapbookChinese.ttf"); -} -@font-face { - font-family: "Semphari"; - src: url("../fonts/Semphari.otf"); -} -@font-face { - font-family: "Skaven"; - src: url("../fonts/Skaven.ttf"); -} -@font-face { - font-family: "Tengwar"; - src: url("../fonts/Tengwar.ttf"); -} -@font-face { - font-family: "Thassilonian"; - src: url("../fonts/Thassilonian.ttf"); -} -@font-face { - font-family: "Thorass"; - src: url("../fonts/Thorass.otf"); -} -@font-face { - font-family: "Tuzluca"; - src: url("../fonts/Tuzluca.ttf"); -} -@font-face { - font-family: "Valmaric"; - src: url("../fonts/Valmaric.ttf"); -} diff --git a/src/styles/fonts.css b/src/styles/fonts.css new file mode 100644 index 0000000..e40f12e --- /dev/null +++ b/src/styles/fonts.css @@ -0,0 +1,140 @@ +@font-face { + font-family:'ArCiela'; + src:url('../fonts/ArCiela.ttf'); +} +@font-face { + font-family:'Barazhad'; + src:url('../fonts/Barazhad.otf'); +} +@font-face { + font-family:'Celestial'; + src:url('../fonts/Celestial.ttf'); +} +@font-face { + font-family:'DarkEldar'; + src:url('../fonts/DarkEldar.ttf'); +} +@font-face { + font-family:'Dethek'; + src:url('../fonts/Dethek.otf'); +} +@font-face { + font-family:'ElderFuthark'; + src:url('../fonts/ElderFutharkFS.ttf'); +} +@font-face { + font-family:'Eltharin'; + src:url('../fonts/Eltharin.ttf'); +} +@font-face { + font-family:'Espruar'; + src:url('../fonts/Espruar.otf'); +} +@font-face { + font-family:'Floki'; + src:url('../fonts/Floki.ttf'); +} +@font-face { + font-family:'FingerAlphabet'; + src:url('../fonts/FingerAlphabet.ttf'); +} +@font-face { + font-family:'HighDrowic'; + src:url('../fonts/HighDrowic.otf'); +} +@font-face { + font-family:'HighschoolRunes'; + src:url('../fonts/HighschoolRunes.ttf'); +} +@font-face { + font-family:'Infernal'; + src:url('../fonts/Infernal.ttf'); +} +@font-face { + font-family:'Iokharic'; + src:url('../fonts/Iokharic.otf'); +} +@font-face { + font-family:'JungleSlang'; + src:url('../fonts/JungleSlang.ttf'); +} +@font-face { + font-family:'Kargi'; + src:url('../fonts/Kargi.ttf'); +} +@font-face { + font-family:'MarasEye'; + src:url('../fonts/MarasEye.otf'); +} +@font-face { + font-family:'MeroiticDemotic'; + src:url('../fonts/MeroiticDemotic.ttf'); +} +@font-face { + font-family:'MiroslavNormal'; + src:url('../fonts/MiroslavNormal.ttf'); +} +@font-face { + font-family:'OldeEspruar'; + src:url('../fonts/OldeEspruar.otf'); +} +@font-face { + font-family:'OldeThorass'; + src:url('../fonts/OldeThorass.otf'); +} +@font-face { + font-family:'Ophidian'; + src:url('../fonts/Ophidian.otf'); +} +@font-face { + font-family:'Pulsian'; + src:url('../fonts/Pulsian.ttf'); +} +@font-face { + font-family:'Oriental'; + src:url('../fonts/Oriental.ttf'); +} +@font-face { + font-family:'OrkGlyphs'; + src:url('../fonts/OrkGlyphs.ttf'); +} +@font-face { + font-family:'Qijomi'; + src:url('../fonts/Qijomi.otf'); +} +@font-face { + font-family:'Reanaarian'; + src:url('../fonts/Reanaarian.otf'); +} +@font-face { + font-family:'Saurian'; + src:url('../fonts/Saurian.ttf'); +} +@font-face { + font-family:'Semphari'; + src:url('../fonts/Semphari.otf'); +} +@font-face { + font-family:'Skaven'; + src:url('../fonts/Skaven.ttf'); +} +@font-face { + font-family:'Tengwar'; + src:url('../fonts/Tengwar.ttf'); +} +@font-face { + font-family:'Thassilonian'; + src:url('../fonts/Thassilonian.ttf'); +} +@font-face { + font-family:'Thorass'; + src:url('../fonts/Thorass.otf'); +} +@font-face { + font-family:'Tuzluca'; + src:url('../fonts/Tuzluca.ttf'); +} +@font-face { + font-family:'Valmaric'; + src:url('../fonts/Valmaric.ttf'); +} \ No newline at end of file diff --git a/src/styles/polyglot.scss b/src/styles/polyglot.scss index ff825b1..6a8d981 100644 --- a/src/styles/polyglot.scss +++ b/src/styles/polyglot.scss @@ -1,4 +1,3 @@ -@import "fonts"; @import "init"; @import "chat";