Skip to content

Commit

Permalink
Component list ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
rsnyder committed Jul 25, 2021
1 parent 82f3850 commit 2deb7ed
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1579,36 +1579,38 @@ <h1>Update Juncture site</h1>
let ref = contentSource.acct === 'jstor-labs' && contentSource.repo === 'juncture' ? junctureVersionHash : contentSource.ref

if (window.location.hostname === 'localhost' || window.location.hostname.indexOf('gitpod') > 0) {

componentsList = [...componentsList, ...await listComponents(
`${contentSource.baseUrl}${contentSource.isGhpSite ? contentSource.basePath : ''}`, 'custom/components')]
componentsList = [...componentsList, ...await listComponents(
`${contentSource.baseUrl}${contentSource.isGhpSite ? contentSource.basePath : ''}`, 'components')]
}

if (contentSource.repo !== 'juncture' || contentSource.acct !== 'jstor-labs') {
componentsList = [...componentsList, ...await listComponents(
`https://api.github.com/repos/${contentSource.acct}/${contentSource.repo}/git/trees/${ref}`,
'custom/components',
`https://raw.githubusercontent.com/${contentSource.acct}/${contentSource.repo}/${ref}`)]
componentsList = [...componentsList, ...await listComponents(
`https://api.github.com/repos/${contentSource.acct}/${contentSource.repo}/git/trees/${ref}`,
'components',
`https://raw.githubusercontent.com/${contentSource.acct}/${contentSource.repo}/${ref}`)]
}

} else {

if (contentSource.repo !== 'juncture' || contentSource.acct !== 'jstor-labs') {
componentsList = [...componentsList, ...await listComponents(
`https://api.github.com/repos/${contentSource.acct}/${contentSource.repo}/git/trees/${ref}`,
'custom/components',
`https://raw.githubusercontent.com/${contentSource.acct}/${contentSource.repo}/${ref}`)]
componentsList = [...componentsList, ...await listComponents(
`https://api.github.com/repos/${contentSource.acct}/${contentSource.repo}/git/trees/${ref}`,
'components',
`https://raw.githubusercontent.com/${contentSource.acct}/${contentSource.repo}/${ref}`)]
}

if (window.location.hostname !== 'localhost' && window.location.hostname.indexOf('gitpod') < 0) {
componentsList = [...componentsList, ...await listComponents(
`${contentSource.baseUrl}${contentSource.isGhpSite ? contentSource.basePath : ''}`, 'custom/components')]
componentsList = [...componentsList, ...await listComponents(
`${contentSource.baseUrl}${contentSource.isGhpSite ? contentSource.basePath : ''}`, 'components')]

}

componentsList = [...componentsList, ...await listComponents(
`https://api.github.com/repos/jstor-labs/juncture/git/trees/${junctureVersionHash}`,
'components',
`https://raw.githubusercontent.com/jstor-labs/juncture/${junctureVersionHash}`)]

return componentsList
return componentsList
}

function parseUrl(href) {
Expand Down

0 comments on commit 2deb7ed

Please sign in to comment.