chore: typo

pull/188/head
Anthony Fu 4 years ago
parent 309aa7a8d0
commit 5fc2ee09cd

@ -43,7 +43,7 @@ export async function build(buildOptions: BuildOptions = {}) {
// alter the main chunk's hash on every build. It's also embedded as a
// string and JSON.parsed from the client because it's faster than embedding
// as JS object literal.
const hashMapStirng = JSON.stringify(JSON.stringify(pageToHashMap))
const hashMapString = JSON.stringify(JSON.stringify(pageToHashMap))
for (const page of siteConfig.pages) {
await renderPage(
@ -53,7 +53,7 @@ export async function build(buildOptions: BuildOptions = {}) {
appChunk,
cssChunk,
pageToHashMap,
hashMapStirng
hashMapString
)
}
} catch (e) {

@ -104,7 +104,7 @@ export async function bundle(
fileName: chunk.fileName.replace(/\.js$/, '.lean.js'),
code: chunk.code.replace(staticStripRE, ``)
}
// remove static markers from orginal code
// remove static markers from original code
chunk.code = chunk.code.replace(staticRestoreRE, '')
}
}
@ -145,7 +145,7 @@ export async function bundle(
},
rollupOutputOptions: {
...rollupOutputOptions,
chunkFileNames: (chunk) => {
chunkFileNames(chunk): string {
if (/runtime-dom/.test(chunk.name)) {
return `framework.[hash].js`
}

@ -14,7 +14,7 @@ export async function renderPage(
appChunk: OutputChunk,
cssChunk: OutputAsset,
pageToHashMap: Record<string, string>,
hashMapStirng: string
hashMapString: string
) {
const { createApp } = require(path.join(config.tempDir, `_assets/app.js`))
const { app, router } = createApp()
@ -71,7 +71,7 @@ export async function renderPage(
</head>
<body>
<div id="app">${content}</div>
<script>__VP_HASH_MAP__ = JSON.parse(${hashMapStirng})</script>
<script>__VP_HASH_MAP__ = JSON.parse(${hashMapString})</script>
<script type="module" async src="${assetPath}${appChunk.fileName}"></script>
</body>
</html>`.trim()

@ -37,7 +37,7 @@ export const highlight = (str: string, lang: string) => {
} catch (e) {
console.warn(
chalk.yellow(
`[vuepress] Syntax highlight for language "${lang}" is not supported.`
`[vitepress] Syntax highlight for language "${lang}" is not supported.`
)
)
}

@ -12,7 +12,7 @@ export const slugify = (str: string): string => {
.replace(rControl, '')
// Replace special characters
.replace(rSpecial, '-')
// Remove continous separators
// Remove continuos separators
.replace(/\-{2,}/g, '-')
// Remove prefixing and trailing separtors
.replace(/^\-+|\-+$/g, '')

@ -10,7 +10,7 @@ export const DEFAULT_THEME_PATH = path.join(
)
// special virtual file
// we can't directly import '/@siteData' becase
// we can't directly import '/@siteData' because
// - it's not an actual file so we can't use tsconfig paths to redirect it
// - TS doesn't allow shimming a module that starts with '/'
export const SITE_DATA_ID = '@siteData'

@ -5,7 +5,7 @@
//
// But header's parsing in the markdown content is done by the markdown
// loader based on markdown-it. markdown-it parser will will always keep
// HTML in headers, so in VuePress, after being parsed by the markdiwn
// HTML in headers, so in VuePress, after being parsed by the markdown
// loader, the raw HTML in headers will finally be parsed by Vue-loader.
// so that we can write HTML/Vue in the header. One exception is the HTML
// wrapped by <code>(markdown token: '`') tag.

Loading…
Cancel
Save