Files
medusa-store/www/apps/resources/scripts/generate-slug-changes.mjs
Shahed Nasser 4fe28f5a95 chore: reorganize docs apps (#7228)
* reorganize docs apps

* add README

* fix directory

* add condition for old docs
2024-05-03 17:36:38 +03:00

20 lines
466 B
JavaScript

import { writeFileSync } from "fs"
import getSlugs from "../utils/get-slugs.mjs"
import path from "path"
export async function main() {
const slugs = await getSlugs()
slugs.push(
...(await getSlugs({
basePath: path.resolve("references"),
baseSlug: path.resolve(),
}))
)
// write generated slugs
writeFileSync(
path.resolve("generated", "slug-changes.mjs"),
`export const slugChanges = ${JSON.stringify(slugs, null, 2)}`
)
}