Skip to content

Commit

Permalink
Update distributables
Browse files Browse the repository at this point in the history
  • Loading branch information
James M. Greene authored and James M. Greene committed Aug 18, 2022
1 parent 3a90973 commit 0ec542a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
28 changes: 20 additions & 8 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15571,24 +15571,40 @@ module.exports = { getContext }
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {

const core = __nccwpck_require__(2186)
const removeTrailingSlash = __nccwpck_require__(9255)

function outputPagesBaseUrl(siteUrl) {
core.setOutput('base_url', siteUrl.href)
// Many static site generators do not want the trailing slash, and it is much easier to add than remove in a workflow
const baseUrl = removeTrailingSlash(siteUrl.href)
const basePath = removeTrailingSlash(siteUrl.pathname)

core.setOutput('base_url', baseUrl)
core.setOutput('origin', siteUrl.origin)
core.setOutput('host', siteUrl.host)
core.setOutput('base_path', siteUrl.pathname)
core.setOutput('base_path', basePath)
}

module.exports = outputPagesBaseUrl


/***/ }),

/***/ 9255:
/***/ ((module) => {

module.exports = function removeTrailingSlash(str) {
return str.endsWith('/') ? str.slice(0, -1) : str
}


/***/ }),

/***/ 4770:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {

const core = __nccwpck_require__(2186)
const { ConfigParser } = __nccwpck_require__(8395)
const removeTrailingSlash = __nccwpck_require__(9255)

// Return the settings to be passed to a {ConfigParser} for a given static site generator,
// optional configuration file path, and a Pages path value to inject
Expand All @@ -15609,9 +15625,7 @@ function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, pat
}
case 'next':
// Next does not want a trailing slash
if (path.endsWith('/')) {
path = path.slice(0, -1)
}
path = removeTrailingSlash(path)

return {
configurationFile: generatorConfigFile || './next.config.js',
Expand All @@ -15636,9 +15650,7 @@ function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, pat
}
case 'sveltekit':
// SvelteKit does not want a trailing slash
if (path.endsWith('/')) {
path = path.slice(0, -1)
}
path = removeTrailingSlash(path)

return {
configurationFile: generatorConfigFile || './svelte.config.js',
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

0 comments on commit 0ec542a

Please sign in to comment.