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:
29
node_modules/csso/lib/replace/property/background.js
generated
vendored
29
node_modules/csso/lib/replace/property/background.js
generated
vendored
@@ -1,17 +1,7 @@
|
||||
var List = require('css-tree').List;
|
||||
|
||||
module.exports = function compressBackground(node) {
|
||||
function lastType() {
|
||||
if (buffer.length) {
|
||||
return buffer[buffer.length - 1].type;
|
||||
}
|
||||
}
|
||||
import { List } from 'css-tree';
|
||||
|
||||
export default function compressBackground(node) {
|
||||
function flush() {
|
||||
if (lastType() === 'WhiteSpace') {
|
||||
buffer.pop();
|
||||
}
|
||||
|
||||
if (!buffer.length) {
|
||||
buffer.unshift(
|
||||
{
|
||||
@@ -19,10 +9,6 @@ module.exports = function compressBackground(node) {
|
||||
loc: null,
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
type: 'WhiteSpace',
|
||||
value: ' '
|
||||
},
|
||||
{
|
||||
type: 'Number',
|
||||
loc: null,
|
||||
@@ -36,10 +22,10 @@ module.exports = function compressBackground(node) {
|
||||
buffer = [];
|
||||
}
|
||||
|
||||
var newValue = [];
|
||||
var buffer = [];
|
||||
let newValue = [];
|
||||
let buffer = [];
|
||||
|
||||
node.children.each(function(node) {
|
||||
node.children.forEach((node) => {
|
||||
if (node.type === 'Operator' && node.value === ',') {
|
||||
flush();
|
||||
newValue.push(node);
|
||||
@@ -56,11 +42,6 @@ module.exports = function compressBackground(node) {
|
||||
}
|
||||
}
|
||||
|
||||
// don't add redundant spaces
|
||||
if (node.type === 'WhiteSpace' && (!buffer.length || lastType() === 'WhiteSpace')) {
|
||||
return;
|
||||
}
|
||||
|
||||
buffer.push(node);
|
||||
});
|
||||
|
||||
|
||||
21
node_modules/csso/lib/replace/property/border.js
generated
vendored
21
node_modules/csso/lib/replace/property/border.js
generated
vendored
@@ -1,20 +1,5 @@
|
||||
function removeItemAndRedundantWhiteSpace(list, item) {
|
||||
var prev = item.prev;
|
||||
var next = item.next;
|
||||
|
||||
if (next !== null) {
|
||||
if (next.data.type === 'WhiteSpace' && (prev === null || prev.data.type === 'WhiteSpace')) {
|
||||
list.remove(next);
|
||||
}
|
||||
} else if (prev !== null && prev.data.type === 'WhiteSpace') {
|
||||
list.remove(prev);
|
||||
}
|
||||
|
||||
list.remove(item);
|
||||
}
|
||||
|
||||
module.exports = function compressBorder(node) {
|
||||
node.children.each(function(node, item, list) {
|
||||
export default function compressBorder(node) {
|
||||
node.children.forEach((node, item, list) => {
|
||||
if (node.type === 'Identifier' && node.name.toLowerCase() === 'none') {
|
||||
if (list.head === list.tail) {
|
||||
// replace `none` for zero when `none` is a single term
|
||||
@@ -24,7 +9,7 @@ module.exports = function compressBorder(node) {
|
||||
value: '0'
|
||||
};
|
||||
} else {
|
||||
removeItemAndRedundantWhiteSpace(list, item);
|
||||
list.remove(item);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
4
node_modules/csso/lib/replace/property/font-weight.js
generated
vendored
4
node_modules/csso/lib/replace/property/font-weight.js
generated
vendored
@@ -1,5 +1,5 @@
|
||||
module.exports = function compressFontWeight(node) {
|
||||
var value = node.children.head.data;
|
||||
export default function compressFontWeight(node) {
|
||||
const value = node.children.head.data;
|
||||
|
||||
if (value.type === 'Identifier') {
|
||||
switch (value.name) {
|
||||
|
||||
25
node_modules/csso/lib/replace/property/font.js
generated
vendored
25
node_modules/csso/lib/replace/property/font.js
generated
vendored
@@ -1,7 +1,7 @@
|
||||
module.exports = function compressFont(node) {
|
||||
var list = node.children;
|
||||
export default function compressFont(node) {
|
||||
const list = node.children;
|
||||
|
||||
list.eachRight(function(node, item) {
|
||||
list.forEachRight(function(node, item) {
|
||||
if (node.type === 'Identifier') {
|
||||
if (node.name === 'bold') {
|
||||
item.data = {
|
||||
@@ -10,33 +10,18 @@ module.exports = function compressFont(node) {
|
||||
value: '700'
|
||||
};
|
||||
} else if (node.name === 'normal') {
|
||||
var prev = item.prev;
|
||||
const prev = item.prev;
|
||||
|
||||
if (prev && prev.data.type === 'Operator' && prev.data.value === '/') {
|
||||
this.remove(prev);
|
||||
}
|
||||
|
||||
this.remove(item);
|
||||
} else if (node.name === 'medium') {
|
||||
var next = item.next;
|
||||
|
||||
if (!next || next.data.type !== 'Operator') {
|
||||
this.remove(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// remove redundant spaces
|
||||
list.each(function(node, item) {
|
||||
if (node.type === 'WhiteSpace') {
|
||||
if (!item.prev || !item.next || item.next.data.type === 'WhiteSpace') {
|
||||
this.remove(item);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (list.isEmpty()) {
|
||||
if (list.isEmpty) {
|
||||
list.insert(list.createItem({
|
||||
type: 'Identifier',
|
||||
name: 'normal'
|
||||
|
||||
Reference in New Issue
Block a user