add _buildBlueprintsAsnc in Fetcher

This commit is contained in:
Lachlan Kermode
2018-12-07 13:58:38 +00:00
parent 41e2ba8299
commit 35b8bf4d9c
2 changed files with 34 additions and 22 deletions

View File

@@ -16,8 +16,12 @@ export const defaultResource = {
data: []
}
export function buildDesaturated (tab, resource) {
export function buildDesaturated (sheetId, sheetName, tab, resource) {
const bp = R.clone(defaultBlueprint)
bp.name = sheetName
bp.id = sheetId
bp.resources[tab] = resource
return bp
}
// import all default exports from 'blueprinters' folder
@@ -33,5 +37,6 @@ fs.readdirSync(normalizedPath).forEach(file => {
// each file in blueprinters folder available for granular import from here.
module.exports = Object.assign({
defaultBlueprint,
defaultResource
defaultResource,
buildDesaturated
}, allBps)