Skip to content

Commit 81985fb

Browse files
committed
feat: add gulp
1 parent e3f7702 commit 81985fb

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

src/keeper.rs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,25 @@ pub fn list_all_runner_tasks(
270270
if error_display {
271271
println!(
272272
"{}",
273-
"[tk] jake(https://jakejs.com) command not available for jakefile"
273+
"[tk] jake(https://jakejs.com) command not available for jakefile.js"
274+
.bold()
275+
.red()
276+
);
277+
}
278+
}
279+
}
280+
if runners::gulpfile::is_available() {
281+
if runners::gulpfile::is_command_available() {
282+
if let Ok(runner_tasks) = runners::gulpfile::list_tasks() {
283+
if !runner_tasks.is_empty() {
284+
all_tasks.insert("gulp".to_string(), runner_tasks);
285+
}
286+
}
287+
} else {
288+
if error_display {
289+
println!(
290+
"{}",
291+
"[tk] gulp(https://gulpjs.com/) command not available for gulpfile.js"
274292
.bold()
275293
.red()
276294
);

src/main.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,15 @@ fn diagnose() {
391391
);
392392
}
393393
}
394+
if runners::gulpfile::is_available() {
395+
if !runners::gulpfile::is_command_available() {
396+
problems_count += 1;
397+
println!(
398+
"{} gulp(https://gulpjs.com/) command not available for gulpfile.js",
399+
"Warning:".bold().yellow()
400+
);
401+
}
402+
}
394403
if runners::taskfileyml::is_available() {
395404
if !runners::taskfileyml::is_command_available() {
396405
problems_count += 1;

src/runners/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pub mod xtask;
2424
pub mod xtask_go;
2525
pub mod zed;
2626
pub mod jakefile;
27+
pub mod gulpfile;
2728

2829
use crate::command_utils::CommandOutput;
2930
use crate::errors::KeeperError;
@@ -34,6 +35,7 @@ pub const RUNNERS: &'static [&'static str] = &[
3435
"ant",
3536
"rake",
3637
"jake",
38+
"gulp",
3739
"invoke",
3840
"task",
3941
"cargo-make",
@@ -82,6 +84,7 @@ pub fn run_task(
8284
"make" => makefile::run_task(task_name, task_args, global_args, verbose),
8385
"rake" => rakefile::run_task(task_name, task_args, global_args, verbose),
8486
"jake" => jakefile::run_task(task_name, task_args, global_args, verbose),
87+
"gulp" => gulpfile::run_task(task_name, task_args, global_args, verbose),
8588
"task" => taskfileyml::run_task(task_name, task_args, global_args, verbose),
8689
"invoke" => taskspy::run_task(task_name, task_args, global_args, verbose),
8790
"cargo-make" => makefiletoml::run_task(task_name, task_args, global_args, verbose),
@@ -109,6 +112,7 @@ pub fn get_runner_file_name(runner: &str) -> &'static str {
109112
"ant" => "build.xml",
110113
"rake" => "Rakefile",
111114
"jake" => "jakefile.js",
115+
"gulp" => "gulpfile.js",
112116
"invoke" => "tasks.py",
113117
"task" => "Taskfile.yml",
114118
"cargo-make" => "Makefile.toml",
@@ -140,6 +144,7 @@ pub fn get_runner_web_url(runner: &str) -> &'static str {
140144
"ant" => "https://ant.apache.org/",
141145
"rake" => "https://ruby.github.io/rake/",
142146
"jake" => "https://jakejs.com/",
147+
"gulp" => "https://gulpjs.com/",
143148
"invoke" => "https://www.pyinvoke.org",
144149
"task" => "https://taskfile.dev",
145150
"cargo-make" => "https://github.com/sagiegurari/cargo-make",

0 commit comments

Comments
 (0)