Commit 0a26112a authored by Dan Allen's avatar Dan Allen

rename FileCatalog to ContentCatalog in content classifier component

parent 3189b21e
......@@ -119,7 +119,7 @@ Files in the ROOT module are promoted a level above the named modules when publi
AsciiDoc files are assumed to have the file extension `.adoc`.
Files and folders which begin with an underscore are not published.
The content catalog object (instance of `FileCatalog`) produced by this component should have a well defined, queryable index of virtual files.
The content catalog object (instance of `ContentCatalog`) produced by this component should have provide a queryable index of virtual files.
Each virtual file in the content catalog should have the `src`, `out`, and `pub` properties fully populated.
The `src.origin` property information attached to each file should also be carried over from the `aggregate`.
......
......@@ -6,8 +6,7 @@ const _ = require('lodash')
const $files = Symbol('$files')
const $generateId = Symbol('$generateId')
// if we really expose addFile(), this class would need to be exposed
class FileCatalog {
class ContentCatalog {
constructor () {
this[$files] = {}
}
......@@ -40,7 +39,7 @@ class FileCatalog {
}
module.exports = (playbook, corpus) => {
const vinylCatalog = new FileCatalog()
const catalog = new ContentCatalog()
corpus.forEach(({ name, title, version, nav, files }) => {
files.forEach((file) => {
......@@ -61,12 +60,12 @@ module.exports = (playbook, corpus) => {
file.out = resolveOut(file.src, playbook.urls.htmlExtensionStyle)
file.pub = resolvePub(file.src, file.out, playbook.urls.htmlExtensionStyle, playbook.site.url)
// maybe addFile() should be "really" public and do all the stuffs above
vinylCatalog.addFile(file)
// maybe addFile() should be "really" public and handle all the stuff above
catalog.addFile(file)
})
})
return vinylCatalog
return catalog
}
function partitionSrc (file, pathSegments, nav) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment