Open kud opened 10 years ago
Yes I know, you can do:
desc('Compile assets.') task('compile', function() { console.log( chalk.blue('❯ Compiling...\n') ) jake.exec('gulp compile', { interactive: true }, function() { console.log( chalk.green('\n✔ Compiled!') ) }) }) namespace('compile', function () { desc('Compile assets with optimisation.') task('production', function() { console.log( chalk.blue('❯ Compiling...\n') ) jake.exec('gulp compile --dist', { interactive: true }, function() { console.log( chalk.green('\n✔ Compiled!') ) }) }) })
But I think it's clearer and more logical to do:
namespace('compile', function () { desc('Compile assets.') task('default', function() { console.log( chalk.blue('❯ Compiling...\n') ) jake.exec('gulp compile', { interactive: true }, function() { console.log( chalk.green('\n✔ Compiled!') ) }) }) desc('Compile assets with optimisation.') task('production', function() { console.log( chalk.blue('❯ Compiling...\n') ) jake.exec('gulp compile --dist', { interactive: true }, function() { console.log( chalk.green('\n✔ Compiled!') ) }) }) })
So are you saying that Jake would essentially create a base-level "compile" alias for "compile:default"?
Yes :)
I'm not opposed to this. Would you like to make a PR?
Yes I know, you can do:
But I think it's clearer and more logical to do: