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:
60
node_modules/svgo/plugins/removeDimensions.js
generated
vendored
60
node_modules/svgo/plugins/removeDimensions.js
generated
vendored
@@ -1,13 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
exports.name = 'removeDimensions';
|
||||
|
||||
exports.type = 'perItem';
|
||||
|
||||
exports.active = false;
|
||||
|
||||
exports.description =
|
||||
'removes width and height in presence of viewBox (opposite to removeViewBox, disable it first)';
|
||||
export const name = 'removeDimensions';
|
||||
export const description =
|
||||
'removes width and height in presence of viewBox (opposite to removeViewBox)';
|
||||
|
||||
/**
|
||||
* Remove width/height attributes and add the viewBox attribute if it's missing
|
||||
@@ -17,27 +10,32 @@ exports.description =
|
||||
* ↓
|
||||
* <svg viewBox="0 0 100 50" />
|
||||
*
|
||||
* @param {Object} item current iteration item
|
||||
* @return {Boolean} if true, with and height will be filtered out
|
||||
*
|
||||
* @author Benny Schudel
|
||||
*
|
||||
* @type {import('../lib/types.js').Plugin}
|
||||
*/
|
||||
exports.fn = function (item) {
|
||||
if (item.type === 'element' && item.name === 'svg') {
|
||||
if (item.attributes.viewBox != null) {
|
||||
delete item.attributes.width;
|
||||
delete item.attributes.height;
|
||||
} else if (
|
||||
item.attributes.width != null &&
|
||||
item.attributes.height != null &&
|
||||
Number.isNaN(Number(item.attributes.width)) === false &&
|
||||
Number.isNaN(Number(item.attributes.height)) === false
|
||||
) {
|
||||
const width = Number(item.attributes.width);
|
||||
const height = Number(item.attributes.height);
|
||||
item.attributes.viewBox = `0 0 ${width} ${height}`;
|
||||
delete item.attributes.width;
|
||||
delete item.attributes.height;
|
||||
}
|
||||
}
|
||||
export const fn = () => {
|
||||
return {
|
||||
element: {
|
||||
enter: (node) => {
|
||||
if (node.name === 'svg') {
|
||||
if (node.attributes.viewBox != null) {
|
||||
delete node.attributes.width;
|
||||
delete node.attributes.height;
|
||||
} else if (
|
||||
node.attributes.width != null &&
|
||||
node.attributes.height != null &&
|
||||
Number.isNaN(Number(node.attributes.width)) === false &&
|
||||
Number.isNaN(Number(node.attributes.height)) === false
|
||||
) {
|
||||
const width = Number(node.attributes.width);
|
||||
const height = Number(node.attributes.height);
|
||||
node.attributes.viewBox = `0 0 ${width} ${height}`;
|
||||
delete node.attributes.width;
|
||||
delete node.attributes.height;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user