diff --git a/.github/workflows/test_run_funcs.yml b/.github/workflows/test_run_funcs.yml index ad75307..6400f1a 100644 --- a/.github/workflows/test_run_funcs.yml +++ b/.github/workflows/test_run_funcs.yml @@ -48,6 +48,8 @@ jobs: rust_string test_multi_code_folders + + deno_string ) status=0 diff --git a/gitfx/parse_funcs.py b/gitfx/parse_funcs.py index c3f3f91..f7c42ad 100644 --- a/gitfx/parse_funcs.py +++ b/gitfx/parse_funcs.py @@ -20,6 +20,7 @@ '.exs': 'elixir', '.php': 'php', '.sh': 'bash', + '.ts': 'deno', '.rs': 'rust'} COMMENT_PREFIX = {'python': '#', @@ -31,6 +32,7 @@ 'elixir': '#', 'php': '//', 'bash': '#', + 'deno': '//', 'rust': '//'} @@ -68,6 +70,7 @@ def parse(path): '*.exs', # Elixir '*.php', # PHP '*sh', # Bash + '*.ts', # Deno '*.rs') # Rust files = [f for fs in [glob(os.path.join(path, t)) for t in types] for f in fs] diff --git a/gitfx/run_funcs.py b/gitfx/run_funcs.py index fbe62a7..f7e48e1 100644 --- a/gitfx/run_funcs.py +++ b/gitfx/run_funcs.py @@ -24,6 +24,7 @@ 'haskell', 'php', 'bash', + 'deno', 'rust'] RUN_CMDS = {'ruby': 'ruby', @@ -34,6 +35,7 @@ 'elixir': 'elixir', 'haskell': 'runhaskell', 'rust': 'perl -e \'($n = $ARGV[0]) =~ s/\.rs$//; system "rustc $ARGV[0] && ./$n && rm $n"\'', # noqa + 'deno': 'deno run --quiet --allow-all', 'php': 'php'} LANG_DEP_FILE = {'ruby': 'Gemfile', @@ -50,7 +52,7 @@ php composer-setup.php --install-dir=/usr/local/bin --filename=composer >/dev/null 2>&1 && \ php composer.phar install >/dev/null 2>&1'} -DOCKER_IMAGES = {} +DOCKER_IMAGES = {'deno': 'denoland/deno'} def docker_image(lang): diff --git a/test/func_examples/function.ts b/test/func_examples/function.ts new file mode 100644 index 0000000..9059336 --- /dev/null +++ b/test/func_examples/function.ts @@ -0,0 +1,3 @@ +// GET /test/result/deno_string + +console.log("hello, deno");