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:
63
node_modules/stylehacks/src/index.js
generated
vendored
63
node_modules/stylehacks/src/index.js
generated
vendored
@@ -1,8 +1,13 @@
|
||||
'use strict';
|
||||
const { dirname } = require('path');
|
||||
const browserslist = require('browserslist');
|
||||
const plugins = require('./plugins');
|
||||
|
||||
/** @typedef {{lint?: boolean}} Options */
|
||||
/**
|
||||
* @typedef {{ overrideBrowserslist?: string | string[] }} AutoprefixerOptions
|
||||
* @typedef {Pick<browserslist.Options, 'stats' | 'path' | 'env'>} BrowserslistOptions
|
||||
* @typedef {{lint?: boolean} & AutoprefixerOptions & BrowserslistOptions} Options
|
||||
*/
|
||||
|
||||
/**
|
||||
* @type {import('postcss').PluginCreator<Options>}
|
||||
@@ -13,36 +18,42 @@ function pluginCreator(opts = {}) {
|
||||
return {
|
||||
postcssPlugin: 'stylehacks',
|
||||
|
||||
OnceExit(css, { result }) {
|
||||
/** @type {typeof result.opts & browserslist.Options} */
|
||||
const resultOpts = result.opts || {};
|
||||
const browsers = browserslist(null, {
|
||||
stats: resultOpts.stats,
|
||||
path: __dirname,
|
||||
env: resultOpts.env,
|
||||
/**
|
||||
* @param {import('postcss').Result & {opts: BrowserslistOptions & {file?: string}}} result
|
||||
*/
|
||||
prepare(result) {
|
||||
const { stats, env, from, file } = result.opts || {};
|
||||
const browsers = browserslist(opts.overrideBrowserslist, {
|
||||
stats: opts.stats || stats,
|
||||
path: opts.path || dirname(from || file || __filename),
|
||||
env: opts.env || env,
|
||||
});
|
||||
|
||||
/** @type {import('./plugin').Plugin[]} */
|
||||
const processors = [];
|
||||
for (const Plugin of plugins) {
|
||||
const hack = new Plugin(result);
|
||||
if (!browsers.some((browser) => hack.targets.has(browser))) {
|
||||
processors.push(hack);
|
||||
}
|
||||
}
|
||||
css.walk((node) => {
|
||||
processors.forEach((proc) => {
|
||||
if (!proc.nodeTypes.has(node.type)) {
|
||||
return;
|
||||
return {
|
||||
OnceExit(css) {
|
||||
/** @type {import('./plugin').Plugin[]} */
|
||||
const processors = [];
|
||||
for (const Plugin of plugins) {
|
||||
const hack = new Plugin(result);
|
||||
if (!browsers.some((browser) => hack.targets.has(browser))) {
|
||||
processors.push(hack);
|
||||
}
|
||||
}
|
||||
css.walk((node) => {
|
||||
processors.forEach((proc) => {
|
||||
if (!proc.nodeTypes.has(node.type)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (opts.lint) {
|
||||
return proc.detectAndWarn(node);
|
||||
}
|
||||
if (opts.lint) {
|
||||
return proc.detectAndWarn(node);
|
||||
}
|
||||
|
||||
return proc.detectAndResolve(node);
|
||||
});
|
||||
});
|
||||
return proc.detectAndResolve(node);
|
||||
});
|
||||
});
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user