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>
30 lines
706 B
JavaScript
Executable File
30 lines
706 B
JavaScript
Executable File
import { attrsGroups } from './_collections.js';
|
|
|
|
export const name = 'removeEmptyAttrs';
|
|
export const description = 'removes empty attributes';
|
|
|
|
/**
|
|
* Remove attributes with empty values.
|
|
*
|
|
* @author Kir Belevich
|
|
*
|
|
* @type {import('../lib/types.js').Plugin}
|
|
*/
|
|
export const fn = () => {
|
|
return {
|
|
element: {
|
|
enter: (node) => {
|
|
for (const [name, value] of Object.entries(node.attributes)) {
|
|
if (
|
|
value === '' &&
|
|
// empty conditional processing attributes prevents elements from rendering
|
|
!attrsGroups.conditionalProcessing.has(name)
|
|
) {
|
|
delete node.attributes[name];
|
|
}
|
|
}
|
|
},
|
|
},
|
|
};
|
|
};
|