Skip to content
Prev Previous commit
inline unnecessary function abstraction
  • Loading branch information
RobinMalfait committed Oct 1, 2021
commit e22e46a1594e3059699a202e6f3d3bb467c1c4ac
8 changes: 2 additions & 6 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,12 +436,8 @@ async function build() {
return resolvedConfig
}

function extractContent(config) {
return config.content.files
}

function extractFileGlobs(config) {
return extractContent(config)
return config.content.files
.filter((file) => {
// Strings in this case are files / globs. If it is something else,
// like an object it's probably a raw content object. But this object
Expand All @@ -452,7 +448,7 @@ async function build() {
}

function extractRawContent(config) {
return extractContent(config).filter((file) => {
return config.content.files.filter((file) => {
return typeof file === 'object' && file !== null
})
}
Expand Down