@vuepress/shared
Advanced tools
Comparing version 2.0.0-rc.2 to 2.0.0-rc.3
@@ -45,10 +45,2 @@ import { MarkdownItHeader } from '@mdit-vue/types'; | ||
/** | ||
* Identifier of the page | ||
* | ||
* Will also be used as the component name | ||
* | ||
* @example 'v-foobar' | ||
*/ | ||
key: string; | ||
/** | ||
* Route path of the page | ||
@@ -240,2 +232,7 @@ * | ||
/** | ||
* Normalize the given path to the final route path | ||
*/ | ||
declare const normalizeRoutePath: (path: string) => string; | ||
/** | ||
* Omit properties from an object | ||
@@ -276,2 +273,2 @@ */ | ||
export { type HeadAttrsConfig, type HeadConfig, type HeadTag, type HeadTagEmpty, type HeadTagNonEmpty, type LocaleConfig, type LocaleData, type PageBase, type PageData, type PageFrontmatter, type PageHeader, type SiteData, type SiteLocaleConfig, type SiteLocaleData, type VuepressSSRContext, dedupeHead, ensureEndingSlash, ensureLeadingSlash, formatDateString, isFunction, isLinkExternal, isLinkHttp, isLinkWithProtocol, isPlainObject, isString, omit, removeEndingSlash, removeLeadingSlash, resolveHeadIdentifier, resolveLocalePath, resolveRoutePathFromUrl }; | ||
export { type HeadAttrsConfig, type HeadConfig, type HeadTag, type HeadTagEmpty, type HeadTagNonEmpty, type LocaleConfig, type LocaleData, type PageBase, type PageData, type PageFrontmatter, type PageHeader, type SiteData, type SiteLocaleConfig, type SiteLocaleData, type VuepressSSRContext, dedupeHead, ensureEndingSlash, ensureLeadingSlash, formatDateString, isFunction, isLinkExternal, isLinkHttp, isLinkWithProtocol, isPlainObject, isString, normalizeRoutePath, omit, removeEndingSlash, removeLeadingSlash, resolveHeadIdentifier, resolveLocalePath, resolveRoutePathFromUrl }; |
@@ -80,2 +80,8 @@ // src/utils/resolveHeadIdentifier.ts | ||
// src/utils/normalizeRoutePath.ts | ||
var normalizeRoutePath = (path) => { | ||
const convertedMdPath = path.endsWith("README.md") ? path.substring(0, path.length - 9) : path.endsWith(".md") ? path.substring(0, path.length - 3) + ".html" : path; | ||
return convertedMdPath.endsWith("/index.html") ? convertedMdPath.substring(0, convertedMdPath.length - 10) : convertedMdPath.endsWith(".html") || convertedMdPath.endsWith("/") ? convertedMdPath : convertedMdPath + ".html"; | ||
}; | ||
// src/utils/omit.ts | ||
@@ -133,2 +139,3 @@ var omit = (obj, ...keys) => { | ||
isString, | ||
normalizeRoutePath, | ||
omit, | ||
@@ -135,0 +142,0 @@ removeEndingSlash, |
{ | ||
"name": "@vuepress/shared", | ||
"version": "2.0.0-rc.2", | ||
"version": "2.0.0-rc.3", | ||
"description": "Utils that shared between VuePress node and client", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13920
381