9023ed3ef9
humanizer 2.2.0 -> 2.9.1 (blader/humanizer, MIT): adds a Voice Calibration section and a passive-voice pattern, reworks negative parallelisms and em dashes. Version moved to metadata.version upstream. impeccable 3.6.0 -> 4.0.4 (pbakaus/impeccable, Apache-2.0): the repo tags the skill and the npm CLI separately, so 3.6.0 was a real release and npm's 3.5.0 was never the comparison. Adds native-platform reference briefs. Each now carries an UPSTREAM file; bin/check-vendored.sh reports drift.
43 lines
1.3 KiB
JavaScript
43 lines
1.3 KiB
JavaScript
/**
|
|
* Generic Vite registry entry: a bundled app with a real `index.html` entry
|
|
* and no framework-specific document ownership. React, Vue, Solid, Preact and
|
|
* a plain TanStack Router SPA all land here — the marker-wrapped script block
|
|
* goes straight into the HTML entry.
|
|
*
|
|
* This is the entry that catches everything with a bundler config; only
|
|
* static-html sits below it.
|
|
*/
|
|
|
|
import { fileExists, findConfigFile, hasAnyDependency } from './detect-utils.mjs';
|
|
|
|
const VITE_CONFIG_RE = /^vite\.config\.(?:js|mjs|cjs|ts|mts|cts)$/;
|
|
|
|
export function detectViteProject(cwd = process.cwd()) {
|
|
const configFile = findConfigFile(cwd, VITE_CONFIG_RE);
|
|
if (configFile) return { configFile, via: 'config' };
|
|
if (hasAnyDependency(cwd, ['vite'])) return { configFile: null, via: 'package' };
|
|
// A zero-config Vite app is index.html + package.json, the same pair
|
|
// roots.mjs treats as an app root.
|
|
if (fileExists(cwd, 'index.html') && fileExists(cwd, 'package.json')) {
|
|
return { configFile: null, via: 'zero-config' };
|
|
}
|
|
return null;
|
|
}
|
|
|
|
export const viteGeneric = {
|
|
name: 'vite-generic',
|
|
|
|
detect(cwd) {
|
|
return detectViteProject(cwd);
|
|
},
|
|
|
|
inject: { kind: 'tag' },
|
|
|
|
source: {
|
|
extensions: ['.tsx', '.jsx'],
|
|
preview: 'source',
|
|
styleMode: 'scoped',
|
|
commentSyntax: 'jsx',
|
|
},
|
|
};
|