From 957b8fdd057ec097a5577aa643af0c5bc088af73 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Fri, 21 Jul 2017 18:44:46 +0200 Subject: [PATCH] chore: default gulp task should not list tasks (#5935) --- .travis.yml | 2 +- gulpfile.js | 2 +- tools/gulp/tasks/default.ts | 14 +++++--------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index a0261553c637..97ab34f9f028 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ env: before_install: - source ./scripts/ci/env.sh - - npm i -g npm@^5.0.1 + - npm i -g npm@^5.3.0 install: - npm install diff --git a/gulpfile.js b/gulpfile.js index 998cd427f1de..4a4707bf4bcb 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -17,7 +17,7 @@ require('ts-node').register({ // The gulp tsconfig file maps specific imports to relative paths. In combination with ts-node // this doesn't work because the JavaScript output will still refer to the imports instead of // to the relative path. Tsconfig-paths can be used to support path mapping inside of Node. -require("tsconfig-paths").register({ +require('tsconfig-paths').register({ baseUrl: path.dirname(tsconfigPath), paths: tsconfig.compilerOptions.paths }); diff --git a/tools/gulp/tasks/default.ts b/tools/gulp/tasks/default.ts index 9d72f4a64e92..a47582b98cee 100644 --- a/tools/gulp/tasks/default.ts +++ b/tools/gulp/tasks/default.ts @@ -1,16 +1,12 @@ import {task} from 'gulp'; -const gulp = require('gulp'); +import {yellow} from 'chalk'; task('default', ['help']); task('help', function() { - const taskList = Object.keys(gulp.tasks) - .filter(taskName => !taskName.startsWith(':')) - .filter(taskName => !taskName.startsWith('ci:')) - .filter(taskName => taskName != 'default') - .sort(); - - console.log(`\nHere's a list of supported tasks:\n `, taskList.join('\n ')); - console.log(`\nYou're probably looking for "test" or "serve:devapp".\n\n`); + console.log(); + console.log('Please specify a gulp task you want to run.'); + console.log(`You're probably looking for ${yellow('test')} or ${yellow('serve:devapp')}.`); + console.log(); });