Closed Jack-Works closed 3 years ago
Moving this to the CLI repo - @sttk can you investigate?
@Jack-Works I remembered and confirmed that --compact-tasks
does not work alone. This flag have to be used with --tasks
.
I tried npx gulp --tasks --compact-tasks
but it emits the same output as --tasks
alone. (Tasks didn't "compact")
The following is an example I confirmed:
$ npm init
$ npm install -D gulp
$ npm install -D ts-node typescript @types/gulp
$ node -v
16.5.0
$ npm -v
6.10.3
$ npx gulp -v
CLI version: 2.3.0
Local version: 4.0.2
$ cat <<EOF > gulpfile.ts
import { task, series } from 'gulp';
const a1 = (cb: Function) => {
console.log('a1');
cb();
};
task('a2', series(a1));
exports.default = series(a1, 'a2')
EOF
$ npx gulp --tasks
[05:32:20] Requiring external module ts-node/register
[05:32:21] Tasks for ~/path/to/gulp-cli-issue-232/gulpfile.ts
[05:32:21] ├─┬ a2
[05:32:21] │ └─┬ <series>
[05:32:21] │ └── a1
[05:32:21] └─┬ default
[05:32:21] └─┬ <series>
[05:32:21] ├── a1
[05:32:21] └─┬ a2
[05:32:21] └─┬ <series>
[05:32:21] └── a1
$ npx gulp --tasks --compact-tasks
[05:33:31] Requiring external module ts-node/register
[05:33:32] Tasks for ~/path/to/gulp-cli-issue-232/gulpfile.ts
[05:33:32] ├─┬ a2
[05:33:32] │ └─┬ <series>
[05:33:32] │ └── a1
[05:33:32] └─┬ default
[05:33:32] └─┬ <series>
[05:33:32] ├── a1
[05:33:32] └── a2
$
As documented:
Reduce the output of task dependency tree by printing only top tasks and their child tasks. This flag can be used with --tasks or --tasks-json.
This seems correct, so I'll close this.
Before you open this issue, please complete the following tasks:
What were you expecting to happen?
returns
What actually happened?
Please provide the following information:
node -v
): 16.5.0npm -v
): pnpm 6.10.3gulp -v
): CLI version: 2.3.0, Local version: 4.0.2