Skip to content

Commit

Permalink
Handling gasket routines (e.g. main) as an array of objects, which ea…
Browse files Browse the repository at this point in the history
…ch have a command and type field (types currently supported: parallel and serial)
  • Loading branch information
melaniecebula committed Dec 31, 2014
1 parent 6d0aa9b commit 8ce5c5b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions index.js
Expand Up @@ -50,9 +50,13 @@ var split = function(pipeline) {

pipeline = [].concat(pipeline || [])
pipeline.forEach(function(p) {
if (p) return current.push(p)
list.push(current)
current = []
if (p.type === "parallel" || p.type === "pipe") {
return current.push(p.command)
} else if (p.type === "serial") {
current.push(p.command)
list.push(current)
current = []
}
})

if (current.length) list.push(current)
Expand Down

1 comment on commit 8ce5c5b

@melaniecebula
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit is an exploration of dat-ecosystem-archive#7 . This would change the way gasket handles pipe/parallel commands versus serial commands. The idea is to move away from using null terminators to achieve serial commands, and instead explicitly set the type field to either pipe/parallel or serial.

Please sign in to comment.