Created
February 28, 2015 02:01
-
-
Save devoncarew/459faa419d87ef850b82 to your computer and use it in GitHub Desktop.
variants on grinder task def annotations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dartdoc for the description; one combined annotation | |
/// Compile stuff. | |
@Task(depends: const [init]) | |
compile() { | |
... | |
} | |
// dartdoc for the description; separate task and depends annotations | |
/// Compile stuff. | |
@task() | |
@depends(const [init]) | |
compile() { | |
... | |
} | |
// separate annotations; description is an optional part of the task annotation | |
@task('Compile stuff.') | |
@depends(init) | |
compile() { | |
context.log("Compiling stuff..."); | |
} | |
// one uber annotation | |
@Task(depends: const [init], description: 'Compile stuff.') | |
compile() { | |
context.log("Compiling stuff..."); | |
} | |
// using a list vs lots of optional arguments | |
@depends(init, foo, bar, baz) | |
- use a list or lots of optional positional args? | |
- title case or lower case for annotations? | |
- one annotation or multiple? | |
- description in dartdocs, or in the @task annotation as an optional positional arg (or a named arg)? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment