Fix code quality violations and exclude Manifest from checks
Document application modes (development/debug/production) Add global file drop handler, order column normalization, SPA hash fix Serve CDN assets via /_vendor/ URLs instead of merging into bundles Add production minification with license preservation Improve JSON formatting for debugging and production optimization Add CDN asset caching with CSS URL inlining for production builds Add three-mode system (development, debug, production) Update Manifest CLAUDE.md to reflect helper class architecture Refactor Manifest.php into helper classes for better organization Pre-manifest-refactor checkpoint: Add app_mode documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
38
node_modules/svgo/plugins/removeAttrs.js
generated
vendored
38
node_modules/svgo/plugins/removeAttrs.js
generated
vendored
@@ -1,9 +1,12 @@
|
||||
'use strict';
|
||||
/**
|
||||
* @typedef RemoveAttrsParams
|
||||
* @property {string=} elemSeparator
|
||||
* @property {boolean=} preserveCurrentColor
|
||||
* @property {string | string[]} attrs
|
||||
*/
|
||||
|
||||
exports.name = 'removeAttrs';
|
||||
exports.type = 'visitor';
|
||||
exports.active = false;
|
||||
exports.description = 'removes specified attributes';
|
||||
export const name = 'removeAttrs';
|
||||
export const description = 'removes specified attributes';
|
||||
|
||||
const DEFAULT_SEPARATOR = ':';
|
||||
const ENOATTRS = `Warning: The plugin "removeAttrs" requires the "attrs" parameter.
|
||||
@@ -83,13 +86,9 @@ plugins: [
|
||||
*
|
||||
* @author Benny Schudel
|
||||
*
|
||||
* @type {import('../lib/types').Plugin<{
|
||||
* elemSeparator?: string,
|
||||
* preserveCurrentColor?: boolean,
|
||||
* attrs: string | Array<string>
|
||||
* }>}
|
||||
* @type {import('../lib/types.js').Plugin<RemoveAttrsParams>}
|
||||
*/
|
||||
exports.fn = (root, params) => {
|
||||
export const fn = (root, params) => {
|
||||
if (typeof params.attrs == 'undefined') {
|
||||
console.warn(ENOATTRS);
|
||||
return null;
|
||||
@@ -110,13 +109,11 @@ exports.fn = (root, params) => {
|
||||
enter: (node) => {
|
||||
for (let pattern of attrs) {
|
||||
// if no element separators (:), assume it's attribute name, and apply to all elements *regardless of value*
|
||||
if (pattern.includes(elemSeparator) === false) {
|
||||
pattern = ['.*', elemSeparator, pattern, elemSeparator, '.*'].join(
|
||||
''
|
||||
);
|
||||
if (!pattern.includes(elemSeparator)) {
|
||||
pattern = ['.*', pattern, '.*'].join(elemSeparator);
|
||||
// if only 1 separator, assume it's element and attribute name, and apply regardless of attribute value
|
||||
} else if (pattern.split(elemSeparator).length < 3) {
|
||||
pattern = [pattern, elemSeparator, '.*'].join('');
|
||||
pattern = [pattern, '.*'].join(elemSeparator);
|
||||
}
|
||||
|
||||
// create regexps for element, attribute name, and attribute value
|
||||
@@ -132,14 +129,11 @@ exports.fn = (root, params) => {
|
||||
if (list[0].test(node.name)) {
|
||||
// loop attributes
|
||||
for (const [name, value] of Object.entries(node.attributes)) {
|
||||
const isCurrentColor = value.toLowerCase() === 'currentcolor';
|
||||
const isFillCurrentColor =
|
||||
preserveCurrentColor &&
|
||||
name == 'fill' &&
|
||||
value == 'currentColor';
|
||||
preserveCurrentColor && name == 'fill' && isCurrentColor;
|
||||
const isStrokeCurrentColor =
|
||||
preserveCurrentColor &&
|
||||
name == 'stroke' &&
|
||||
value == 'currentColor';
|
||||
preserveCurrentColor && name == 'stroke' && isCurrentColor;
|
||||
if (
|
||||
!isFillCurrentColor &&
|
||||
!isStrokeCurrentColor &&
|
||||
|
||||
Reference in New Issue
Block a user