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:
40
node_modules/csso/lib/usage.js
generated
vendored
40
node_modules/csso/lib/usage.js
generated
vendored
@@ -1,15 +1,13 @@
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
const { hasOwnProperty } = Object.prototype;
|
||||
|
||||
function buildMap(list, caseInsensitive) {
|
||||
var map = Object.create(null);
|
||||
const map = Object.create(null);
|
||||
|
||||
if (!Array.isArray(list)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
var name = list[i];
|
||||
|
||||
for (let name of list) {
|
||||
if (caseInsensitive) {
|
||||
name = name.toLowerCase();
|
||||
}
|
||||
@@ -25,9 +23,9 @@ function buildList(data) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var tags = buildMap(data.tags, true);
|
||||
var ids = buildMap(data.ids);
|
||||
var classes = buildMap(data.classes);
|
||||
const tags = buildMap(data.tags, true);
|
||||
const ids = buildMap(data.ids);
|
||||
const classes = buildMap(data.classes);
|
||||
|
||||
if (tags === null &&
|
||||
ids === null &&
|
||||
@@ -36,30 +34,28 @@ function buildList(data) {
|
||||
}
|
||||
|
||||
return {
|
||||
tags: tags,
|
||||
ids: ids,
|
||||
classes: classes
|
||||
tags,
|
||||
ids,
|
||||
classes
|
||||
};
|
||||
}
|
||||
|
||||
function buildIndex(data) {
|
||||
var scopes = false;
|
||||
export function buildIndex(data) {
|
||||
let scopes = false;
|
||||
|
||||
if (data.scopes && Array.isArray(data.scopes)) {
|
||||
scopes = Object.create(null);
|
||||
|
||||
for (var i = 0; i < data.scopes.length; i++) {
|
||||
var list = data.scopes[i];
|
||||
for (let i = 0; i < data.scopes.length; i++) {
|
||||
const list = data.scopes[i];
|
||||
|
||||
if (!list || !Array.isArray(list)) {
|
||||
throw new Error('Wrong usage format');
|
||||
}
|
||||
|
||||
for (var j = 0; j < list.length; j++) {
|
||||
var name = list[j];
|
||||
|
||||
for (const name of list) {
|
||||
if (hasOwnProperty.call(scopes, name)) {
|
||||
throw new Error('Class can\'t be used for several scopes: ' + name);
|
||||
throw new Error(`Class can't be used for several scopes: ${name}`);
|
||||
}
|
||||
|
||||
scopes[name] = i + 1;
|
||||
@@ -70,10 +66,6 @@ function buildIndex(data) {
|
||||
return {
|
||||
whitelist: buildList(data),
|
||||
blacklist: buildList(data.blacklist),
|
||||
scopes: scopes
|
||||
scopes
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
buildIndex: buildIndex
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user