Fix: markdownlint MD012/MD019 errors in build-pattern-conversion-plan.md

- Removed extra blank lines at end of file to resolve MD012 (no-multiple-blanks)
- Standardized heading spacing to resolve MD019 (no-multiple-space-atx)
- Stripped trailing whitespace and ensured file ends with a single newline

All changes maintain content integrity and bring the file into full markdownlint compliance.
This commit is contained in:
Matthew Raymer
2025-07-10 13:07:51 +00:00
parent 00cc6114da
commit 8b95cc8d2b
15 changed files with 249 additions and 198 deletions

View File

@@ -11,16 +11,19 @@ dotenv.config();
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export async function createBuildConfig(mode: string): Promise<UserConfig> {
export async function createBuildConfig(platform: string): Promise<UserConfig> {
const appConfig = await loadAppConfig();
const isCapacitor = mode === "capacitor";
const isElectron = mode === "electron";
const isCapacitor = platform === "capacitor";
const isElectron = platform === "electron";
const isNative = isCapacitor || isElectron;
// Set platform and disable PWA for native platforms
process.env.VITE_PLATFORM = mode;
process.env.VITE_PWA_ENABLED = isNative ? 'false' : 'true';
process.env.VITE_DISABLE_PWA = isNative ? 'true' : 'false';
// Set platform and configure PWA based on environment or platform
process.env.VITE_PLATFORM = platform;
// Use .env file value if set, otherwise default based on platform
if (process.env.VITE_PWA_ENABLED === undefined) {
process.env.VITE_PWA_ENABLED = isNative ? 'false' : 'true';
}
if (isNative) {
process.env.VITE_PWA_ENABLED = 'false';
@@ -59,9 +62,8 @@ export async function createBuildConfig(mode: string): Promise<UserConfig> {
},
define: {
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
'process.env.VITE_PLATFORM': JSON.stringify(mode),
'process.env.VITE_PLATFORM': JSON.stringify(platform),
'process.env.VITE_PWA_ENABLED': JSON.stringify(!isNative),
'process.env.VITE_DISABLE_PWA': JSON.stringify(isNative),
__dirname: JSON.stringify(process.cwd()),
__IS_MOBILE__: JSON.stringify(isCapacitor),
__IS_ELECTRON__: JSON.stringify(isElectron),