22 lines · 788 B · TypeScript
RawDownload
import { existsSync } from 'node:fs'import { joinURL } from 'ufo' /** * Checks if the user has their own index.vue file in the pages folder. * When true, the layer should not define the landing collection and / route. */export function landingPageExists(rootDir: string): boolean {  const vueLandingPath = joinURL(rootDir, 'app', 'pages', 'index.vue')  return existsSync(vueLandingPath)} /** * Checks if a docs folder exists in the content directory. * When true, docs should be prefixed with /docs and only include files from the docs folder. */export function docsFolderExists(rootDir: string, locale?: string): boolean {  const docsPath = locale    ? joinURL(rootDir, 'content', locale, 'docs')    : joinURL(rootDir, 'content', 'docs')  return existsSync(docsPath)}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t