DEV Community

Markdown-based task runner - 'saku'

Yoshiya Hinosawa on May 13, 2018

tl;dr It's painful to use make command as a task runner. It's especially intolerable when writing .PHONY directives for evey task. I fo...
Collapse
 
dmerand profile image
Donald Merand

Interesting approach! On the one hand, I love the expressiveness and human-readability of the task runner definition. On the other hand, I'm slightly irked by overloading markdown syntax with different meaning: first-level header is task name, so what is second-level header?

Collapse
 
kt3k profile image
Yoshiya Hinosawa

Thanks for the comment!

I admit it's a little unnatural to interpret markdown in this way. Probably this approach only works for very simple use cases.
But IMV task definition is simple enough thing which fit into the subset of markdown semantics. So I choose it for config language.

BTW all levels of headings have the same effect as the first-level!

Collapse
 
guilhermejcgois profile image
Gois

Doesn't make senses that a second-level inside a first one do the same think that the first-level do and something more?

Thread Thread
 
kt3k profile image
Yoshiya Hinosawa • Edited

saku doesn't do anything special for the levels of headings, but the user can use the different levels of headings for expressing, for example, different significances of tasks.

For example,

# build

    saku build:js build:css

## build:js

    browserify blah blah

## build:css

    sass blah blah

Where build is at the 1st level because it's an important task, and build:js and build:css are at the 2nd level because they are less important.

Collapse
 
melezhik profile image
Alexey Melezhik • Edited

Interesting idea. Though I found this method allows you to do just a simple things. No more.

So far it's just 2 task runner posts in dev.to under "taskrunner" tag, yours and mine (: