[WIP] Use FontAwesome Component for Vue (#3127)
* wip * Rename * Clean up * Clean up * wip * wip * Enable tree shaking * ✌️ * ✌️ * wip * wip * Clean up
This commit is contained in:
parent
e640dbc501
commit
9f5dc2c0df
190 changed files with 924 additions and 865 deletions
|
@ -13,7 +13,6 @@ const ProgressBarPlugin = require('progress-bar-webpack-plugin');
|
|||
|
||||
import I18nReplacer from './src/misc/i18n';
|
||||
import { pattern as i18nPattern, replacement as i18nReplacement } from './webpack/i18n';
|
||||
import { pattern as faPattern, replacement as faReplacement } from './src/misc/fa';
|
||||
const constants = require('./src/const.json');
|
||||
|
||||
const locales = require('./locales');
|
||||
|
@ -22,15 +21,11 @@ const version = meta.clientVersion;
|
|||
const codename = meta.codename;
|
||||
|
||||
declare var global: {
|
||||
faReplacement: typeof faReplacement;
|
||||
collapseSpacesReplacement: any;
|
||||
base64replacement: any;
|
||||
i18nReplacement: typeof i18nReplacement;
|
||||
};
|
||||
|
||||
//#region Replacer definitions
|
||||
global['faReplacement'] = faReplacement;
|
||||
|
||||
global['collapseSpacesReplacement'] = (html: string) => {
|
||||
return minifyHtml(html, {
|
||||
collapseWhitespace: true,
|
||||
|
@ -39,10 +34,6 @@ global['collapseSpacesReplacement'] = (html: string) => {
|
|||
}).replace(/\t/g, '');
|
||||
};
|
||||
|
||||
global['base64replacement'] = (_: any, key: string) => {
|
||||
return fs.readFileSync(`${__dirname}/src/client/${key}`, 'base64');
|
||||
};
|
||||
|
||||
global['i18nReplacement'] = i18nReplacement;
|
||||
|
||||
//#endregion
|
||||
|
@ -142,15 +133,9 @@ module.exports = {
|
|||
loader: 'replace',
|
||||
query: {
|
||||
qs: [{
|
||||
search: /%base64:(.+?)%/g.toString(),
|
||||
replace: 'base64replacement'
|
||||
}, {
|
||||
search: i18nPattern.toString(),
|
||||
replace: 'i18nReplacement',
|
||||
i18n: true
|
||||
}, {
|
||||
search: faPattern.toString(),
|
||||
replace: 'faReplacement'
|
||||
}, {
|
||||
search: /^<template>([\s\S]+?)\r?\n<\/template>/.toString(),
|
||||
replace: 'collapseSpacesReplacement'
|
||||
|
@ -218,9 +203,6 @@ module.exports = {
|
|||
search: i18nPattern.toString(),
|
||||
replace: 'i18nReplacement',
|
||||
i18n: true
|
||||
}, {
|
||||
search: faPattern.toString(),
|
||||
replace: 'faReplacement'
|
||||
}]
|
||||
}
|
||||
}]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue