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:
37
node_modules/svgo/plugins/removeUselessStrokeAndFill.js
generated
vendored
37
node_modules/svgo/plugins/removeUselessStrokeAndFill.js
generated
vendored
@@ -1,38 +1,39 @@
|
||||
'use strict';
|
||||
import { detachNodeFromParent } from '../lib/xast.js';
|
||||
import { visit, visitSkip } from '../lib/util/visit.js';
|
||||
import { collectStylesheet, computeStyle } from '../lib/style.js';
|
||||
import { hasScripts } from '../lib/svgo/tools.js';
|
||||
import { elemsGroups } from './_collections.js';
|
||||
|
||||
const { visit, visitSkip, detachNodeFromParent } = require('../lib/xast.js');
|
||||
const { collectStylesheet, computeStyle } = require('../lib/style.js');
|
||||
const { elemsGroups } = require('./_collections.js');
|
||||
/**
|
||||
* @typedef RemoveUselessStrokeAndFillParams
|
||||
* @property {boolean=} stroke
|
||||
* @property {boolean=} fill
|
||||
* @property {boolean=} removeNone
|
||||
*/
|
||||
|
||||
exports.type = 'visitor';
|
||||
exports.name = 'removeUselessStrokeAndFill';
|
||||
exports.active = true;
|
||||
exports.description = 'removes useless stroke and fill attributes';
|
||||
export const name = 'removeUselessStrokeAndFill';
|
||||
export const description = 'removes useless stroke and fill attributes';
|
||||
|
||||
/**
|
||||
* Remove useless stroke and fill attrs.
|
||||
*
|
||||
* @author Kir Belevich
|
||||
*
|
||||
* @type {import('../lib/types').Plugin<{
|
||||
* stroke?: boolean,
|
||||
* fill?: boolean,
|
||||
* removeNone?: boolean
|
||||
* }>}
|
||||
* @type {import('../lib/types.js').Plugin<RemoveUselessStrokeAndFillParams>}
|
||||
*/
|
||||
exports.fn = (root, params) => {
|
||||
export const fn = (root, params) => {
|
||||
const {
|
||||
stroke: removeStroke = true,
|
||||
fill: removeFill = true,
|
||||
removeNone = false,
|
||||
} = params;
|
||||
|
||||
// style and script elements deoptimise this plugin
|
||||
// style and script elements deoptimize this plugin
|
||||
let hasStyleOrScript = false;
|
||||
visit(root, {
|
||||
element: {
|
||||
enter: (node) => {
|
||||
if (node.name === 'style' || node.name === 'script') {
|
||||
if (node.name === 'style' || hasScripts(node)) {
|
||||
hasStyleOrScript = true;
|
||||
}
|
||||
},
|
||||
@@ -47,11 +48,11 @@ exports.fn = (root, params) => {
|
||||
return {
|
||||
element: {
|
||||
enter: (node, parentNode) => {
|
||||
// id attribute deoptimise the whole subtree
|
||||
// id attribute deoptimize the whole subtree
|
||||
if (node.attributes.id != null) {
|
||||
return visitSkip;
|
||||
}
|
||||
if (elemsGroups.shape.includes(node.name) == false) {
|
||||
if (!elemsGroups.shape.has(node.name)) {
|
||||
return;
|
||||
}
|
||||
const computedStyle = computeStyle(stylesheet, node);
|
||||
|
||||
Reference in New Issue
Block a user