tasks/checkoutdated.js: grunt-check-outdated
- grunt-check-outdated/tasks/checkoutdated
- .spawnAsync(grunt, config) ⇒
Promise.<Object> - .execute(grunt, task, obj)
- .runTask() ⇒
Promise - .registerMultiTask(grunt)
- .spawnAsync(grunt, config) ⇒
Promisified adapter for
grunt.util.spawn.Wraps the callback-based
grunt.util.spawnAPI into a Promise so it can be consumed via async/await without mixing callback and business logic. The Promise resolves with the spawn result or rejects with the execution error.
Returns: Promise.<Object> - Resolves with the spawn result object provided by Grunt,
or rejects with an Error if the process execution fails.
| Param | Type | Description |
|---|---|---|
| grunt | grunt |
The Grunt runtime instance providing grunt.util.spawn. |
| config | Object |
Spawn configuration passed through to grunt.util.spawn. |
| config.cmd | string |
Executable to run. |
| config.args | Array.<string> |
Command-line arguments passed to the executable. |
| config.opts | Object |
Options object forwarded to the spawn call (env, cwd, stdio). |
Return a promise for executing 'node --[node opts] check-outdated --[opts]'
| Param | Type | Description |
|---|---|---|
| grunt | grunt |
the runtime 'instance' of grunt. |
| task | grunt.task |
the current task |
| obj | Object |
wrapper for options and arguments. |
Run the check-outdated task.
Returns: Promise - ... required by callee to terminate async call (on "then")
Registers the 'check_outdated' multitask.
Note:
- Any errors thrown in lower-level functions (e.g.,
execute,toArgs,spawnAsync) will automatically reject the returned Promise.- Rejected Promises are handled by logging the error and calling
done(false)to fail the task.*
| Param | Type |
|---|---|
| grunt | grunt |