Tasks: allow passing arguments to tasks
See original GitHub issueExample:
const hello = project.addTask('hello');
project.exec(`echo Hello, $@!`);
$ pj hello "world"
Hello, world!
Questions
- The
$@
notation is just an example. Perhaps it would be easiest to support this by injecting the arguments into environment variable(s). - Would be amazing if tasks could leverage yargs’ engine to parse switches.
- Should tasks also “register” positional arguments and switches for yargs?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:13
- Comments:21 (16 by maintainers)
Top Results From Across the Web
Task.Run with Parameter(s)? - Stack Overflow
This is the best answer as it allows a state to be passed in, and prevents the possible situation mentioned in Kaden Burgart's...
Read more >TASK ARGUMENTS PASSING - Verification Academy
inside write0 and read0 and marchrun i am unable to get variables(addr,data) which are passing like arguments to the tasks
Read more >Task parametrization, getting arguments from command line
It is possible to pass option parameters to the task action through the command line. Just add a params field to the task...
Read more >Authoring Tasks - Gradle User Manual
Task outcomes; Defining tasks; Locating tasks; Configuring tasks; Passing arguments to a task constructor; Adding dependencies to a task; Ordering tasks ...
Read more >Correct way to provide parameter to C# Task - Dot Net For All
In this article I will discuss the correct way to provide input parameter to the task and not to use the shared variable...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Another use case
yarn deploy --profile damadden88
Maybe as an escape hatch for all tasks, we could allow extra arguments to be passed automatically after a “–”, as in:
And meanwhile, more fancy argument-insertion could be allowed like so: