update build settings

Signed-off-by: WaitSpring <me@waitspring.com>
这个提交包含在:
WaitSpring 2023-11-19 11:51:42 +08:00
父节点 c0cbc6d87f
当前提交 8909309e29
找不到此签名对应的密钥
共有 2 个文件被更改,包括 12 次插入42 次删除

查看文件

@ -1,54 +1,23 @@
'use strict';
/**
* SVGO Configuration
* Compatible to v2.4.0+
* Recommended options from:
* https://www.mediawiki.org/wiki/Manual:Coding_conventions/SVG#Exemplified_safe_configuration
*/
// https://www.mediawiki.org/wiki/Manual:Coding_conventions/SVG#Exemplified_safe_configuration
module.exports = {
js2svg: {
eol: 'lf',
finalNewline: false,
indent: '\t'
},
multipass: true,
plugins: [
{
// Set of built-in plugins enabled by default.
name: 'preset-default',
params: {
overrides: {
removeDesc: false,
removeTitle: false,
removeViewBox: false,
// If the SVG doesn't start with an XML declaration,
// then its MIME type will be detected as "text/plain"
// rather than "image/svg+xml" by libmagic and, consequently,
// MediaWiki's CSSMin CSS minifier.
// libmagic's default database currently requires that
// SVGs contain an XML declaration:
// https://github.com/threatstack/libmagic/blob/master/magic/Magdir/sgml#L5
removeXMLProcInst: false, // https://phabricator.wikimedia.org/T327446
convertPathData: false, // https://github.com/svg/svgo/issues/880 https://github.com/svg/svgo/issues/1487
removeMetadata: false, // Copyright-Violation
removeHiddenElems: false, // source for converted text2path
removeUnknownsAndDefaults: false, // removes Flow-Text: https://commons.wikimedia.org/wiki/User:JoKalliauer/RepairFlowRoot
cleanupNumericValues: false, // https://github.com/svg/svgo/issues/1080
minifyStyles: false, // https://github.com/svg/svgo/issues/888
removeComments: false, // reduces readability
removeEditorsNSData: false, // https://github.com/svg/svgo/issues/1096
collapseGroups: false, // https://github.com/svg/svgo/issues/1057
removeEmptyContainers: false, // https://github.com/svg/svgo/issues/1194 https://github.com/svg/svgo/issues/1618
convertTransform: false, // https://github.com/svg/svgo/issues/988 https://github.com/svg/svgo/issues/1021
inlineStyles: false // https://github.com/svg/svgo/issues/1486
removeViewBox: false
}
}
},
'removeRasterImages',
'sortAttrs'
],
// Set whitespace according to Wikimedia Coding Conventions.
// @see https://github.com/svg/svgo/blob/v2.8.0/lib/stringifier.js#L41 for available options.
js2svg: {
eol: 'lf',
finalNewline: true,
// Configure the indent to tabs (default 4 spaces) used by '--pretty' here.
indent: '\t',
pretty: true
},
multipass: true
]
};

查看文件

@ -3,7 +3,8 @@
"extends": [
"wikimedia/client-common",
"wikimedia/language/es2022",
"wikimedia/mediawiki"
"wikimedia/mediawiki",
"wikimedia/jquery"
],
"rules": {
"no-jquery/no-global-selector": "off",