Skip to content

Commit

Permalink
fix(docs): ssg build
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoenescu committed Dec 4, 2024
1 parent 1952302 commit 842b3a1
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 35 deletions.
1 change: 0 additions & 1 deletion docs/build/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ function prodLoad (id) {
if (id.startsWith(resolvedIdPrefix) === true) {
const exampleId = id.substring(id.indexOf(':') + 1)
const files = globSync(join(targetFolder, exampleId, '/*.vue'), { absolute: true })
console.log(files)

const localFolder = join(targetFolder, exampleId) + '/'
const localFolderLen = localFolder.length
Expand Down
6 changes: 3 additions & 3 deletions docs/build/ssg.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { join } from 'node:path'
import { fileURLToPath } from 'node:url'
import axios from 'axios'
import fse from 'fs-extra'
import { globSync } from 'tinyglobby'
import fg from 'fast-glob'

axios.defaults.withCredentials = true

Expand All @@ -16,7 +16,7 @@ const mdPagesLen = mdPagesDir.length + 1
const themedRouteList = [
'', // landing page
...(
globSync(join(mdPagesDir, '**/*.md')).map(key => {
fg.sync(join(mdPagesDir, '**/*.md')).map(key => {
const parts = key.substring(mdPagesLen, key.length - 3).split('/')
const len = parts.length
const _path = parts[ len - 2 ] === parts[ len - 1 ]
Expand All @@ -34,7 +34,7 @@ const lowerCaseRE = /^[a-z]/
const lightRouteList = [
'layout-builder',
...(
globSync(join(layoutGalleryDir, '*.vue'))
fg.sync(join(layoutGalleryDir, '*.vue'))
.map(entry => entry.substring(layoutGalleryLen, entry.length - 4))
.filter(entry => lowerCaseRE.test(entry))
.map(entry => 'layout/gallery/' + entry)
Expand Down
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"eslint": "^8.57.0",
"eslint-config-quasar": "^0.0.1",
"eslint-plugin-quasar": "^1.1.0",
"fast-glob": "^3.3.2",
"fs-extra": "^11.2.0",
"gray-matter": "^4.0.3",
"markdown-ast": "^0.3.0",
Expand Down
94 changes: 63 additions & 31 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 842b3a1

Please sign in to comment.