Commit bb02ba8b authored by Max F. Albrecht's avatar Max F. Albrecht
Browse files

cleanup

parent 4ded6658
......@@ -11,7 +11,7 @@ imagePath = path.join(DIR, 'Masters', 'HFS')
#
getKeyFromList = (list, key)-> f.compact f.map list, (item)-> item[key]
getKeysFromList = (list, key)-> f.compact f.map list, (item)-> item[key]
listOfAllUseds = (list, key)->
f.uniq f.flatten f.compact f.map list, (item)-> item[key]
......@@ -31,13 +31,12 @@ workflows = f.chain(fs.readdirSync(workflowPath))
.map (baseName)-> path.join(workflowPath, baseName)
.select (filePath)-> f.endsWith(filePath, '.plist')
.map (filePath)-> plist.parse(fs.readFileSync(filePath).toString())
.run()
workflows = f.map workflows, (flow)->
.map (flow)->
title: flow.title
packages: getKeyFromList(flow.steps, 'package')
files: getKeyFromList(flow.steps, 'file')
images: getKeyFromList(flow.steps, 'image')
packages: getKeysFromList(flow.steps, 'package')
files: getKeysFromList(flow.steps, 'file')
images: getKeysFromList(flow.steps, 'image')
.run()
listOfUnusedPackages = f.difference(packages, listOfAllUseds(workflows, 'packages'))
listOfUnusedFiles= f.difference(files, listOfAllUseds(workflows, 'files'))
......
Supports Markdown
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