Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
build: add files from electronjs.org-new
Browse files Browse the repository at this point in the history
There are some files in electronjs.org-new that are not part of the
markdown that need to be translated as well.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Rel: electron/website#64
  • Loading branch information
molant committed Jul 13, 2021
1 parent dc2fd44 commit 828913d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions script/collect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,15 @@ async function main() {
const tutorials = await filterTutorials(latestBranchContents)
const websiteContent = await fetchWebsiteContent()
const blogposts = await fetchWebsiteBlogPosts()
const newSite = await fetchNewWebsiteConfig()

const content = [
...apiDocs,
apiDefinitions,
...tutorials,
websiteContent,
...blogposts,
...newSite,
]

/**
Expand Down Expand Up @@ -230,6 +232,25 @@ async function fetchWebsiteBlogPosts() {
})
}

async function fetchNewWebsiteConfig() {
console.log(
'Fetching configuration files from electron/electronjs.org-new#main'
)

const files = await roggy('main', {
owner: 'electron',
repository: 'electronjs.org-new',
downloadMatch: 'i18n/en-US',
})

return files.map((file) => {
return {
...file,
filename: path.join('website', 'i18n', file.filename),
}
})
}

async function getObsoleteFiles(contents: Content[], destinationPath: string) {
const currentFiles = walkSync(destinationPath, {
directories: false,
Expand Down

0 comments on commit 828913d

Please sign in to comment.