mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-24 00:39:32 +09:00
✌️
This commit is contained in:
parent
cf0351225f
commit
d253df4574
@ -209,7 +209,7 @@
|
|||||||
"vue-cropperjs": "2.2.0",
|
"vue-cropperjs": "2.2.0",
|
||||||
"vue-js-modal": "1.3.13",
|
"vue-js-modal": "1.3.13",
|
||||||
"vue-json-tree-view": "2.1.4",
|
"vue-json-tree-view": "2.1.4",
|
||||||
"vue-loader": "15.0.11",
|
"vue-loader": "15.0.5",
|
||||||
"vue-router": "3.0.1",
|
"vue-router": "3.0.1",
|
||||||
"vue-template-compiler": "2.5.16",
|
"vue-template-compiler": "2.5.16",
|
||||||
"vuedraggable": "2.16.0",
|
"vuedraggable": "2.16.0",
|
||||||
|
@ -7,10 +7,7 @@ import * as regular from '@fortawesome/fontawesome-free-regular';
|
|||||||
import * as solid from '@fortawesome/fontawesome-free-solid';
|
import * as solid from '@fortawesome/fontawesome-free-solid';
|
||||||
import * as brands from '@fortawesome/fontawesome-free-brands';
|
import * as brands from '@fortawesome/fontawesome-free-brands';
|
||||||
|
|
||||||
// Add icons
|
fontawesome.library.add(regular, solid, brands);
|
||||||
fontawesome.library.add(regular);
|
|
||||||
fontawesome.library.add(solid);
|
|
||||||
fontawesome.library.add(brands);
|
|
||||||
|
|
||||||
export const pattern = /%fa:(.+?)%/g;
|
export const pattern = /%fa:(.+?)%/g;
|
||||||
|
|
||||||
|
@ -110,14 +110,14 @@ const plugins = [
|
|||||||
//#region i18n
|
//#region i18n
|
||||||
langs.forEach(lang => {
|
langs.forEach(lang => {
|
||||||
Object.keys(entry).forEach(file => {
|
Object.keys(entry).forEach(file => {
|
||||||
let src = fs.readFileSync(`${__dirname}/built/client/assets/${file}.${version}.-.${isProduction ? 'min' : 'raw'}.js`, 'utf8');
|
let src = fs.readFileSync(`${__dirname}/built/client/assets/${file}.${version}.-.${isProduction ? 'min' : 'raw'}.js`, 'utf-8');
|
||||||
|
|
||||||
const i18nReplacer = new I18nReplacer(lang);
|
const i18nReplacer = new I18nReplacer(lang);
|
||||||
|
|
||||||
src = src.replace(i18nReplacer.pattern, i18nReplacer.replacement);
|
src = src.replace(i18nReplacer.pattern, i18nReplacer.replacement);
|
||||||
src = src.replace('%lang%', lang);
|
src = src.replace('%lang%', lang);
|
||||||
|
|
||||||
fs.writeFileSync(`${__dirname}/built/client/assets/${file}.${version}.${lang}.${isProduction ? 'min' : 'raw'}.js`, src, 'utf8');
|
fs.writeFileSync(`${__dirname}/built/client/assets/${file}.${version}.${lang}.${isProduction ? 'min' : 'raw'}.js`, src, 'utf-8');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
//#endregion
|
//#endregion
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
const loaderUtils = require('loader-utils');
|
import { getOptions } from 'loader-utils';
|
||||||
|
|
||||||
function trim(text, g) {
|
function trim(text, g) {
|
||||||
return text.substring(1, text.length - (g ? 2 : 0));
|
return text.substring(1, text.length - (g ? 2 : 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = function(src) {
|
export default function(src) {
|
||||||
this.cacheable();
|
this.cacheable();
|
||||||
const options = loaderUtils.getOptions(this);
|
const options = getOptions(this);
|
||||||
const search = options.search;
|
const search = options.search;
|
||||||
const g = search[search.length - 1] == 'g';
|
const g = search[search.length - 1] == 'g';
|
||||||
const file = this.resourcePath.replace(/\\/g, '/');
|
const file = this.resourcePath.replace(/\\/g, '/');
|
||||||
@ -19,4 +19,4 @@ module.exports = function(src) {
|
|||||||
src = src.replace(new RegExp(trim(search, g), g ? 'g' : ''), replace);
|
src = src.replace(new RegExp(trim(search, g), g ? 'g' : ''), replace);
|
||||||
this.callback(null, src);
|
this.callback(null, src);
|
||||||
return src;
|
return src;
|
||||||
};
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user