denox

Execute Deno script even if you don't have Deno installed

Stars
9
Committers
3

Execute Deno script even if you don't have Deno installed

Why? It looks the same as Deno's command line, so why do I need such a tool? There are scenarios where I need to run the same script with different versions of Deno In such scenarios, Deno's version manager may not be the best option

Features

  • Cross platform support
  • Install Deno automatically
  • Support any version of Deno with environment variable DENO_VERSION
  • Fully compatible with Deno

Usage

# run script with latest version of Deno
$ denox https://deno.land/std/examples/welcome.ts
# run script with specific version of Deno
$ DENO_VERSION=v0.26.0 denox https://deno.land/std/examples/welcome.ts

Installation

If you are using Linux/MacOS. you can install it with following command:

# install latest version
wget -qO- https://raw.githubusercontent.com/axetroy/denox/master/install.sh | bash
# or install specified version
wget -qO- https://raw.githubusercontent.com/axetroy/denox/master/install.sh | bash -s v0.1.1

Or you can

Download the executable file for your platform at release page

Then set the environment variable.

eg, the executable file is in the ~/bin directory.

# ~/.bash_profile
export PATH="$PATH:~/bin"

finally, try it out.

$ denox https://deno.land/x/std/examples/welcome.ts

Build from source code

Make sure you have [email protected] installed.

$ git clone https://github.com/axetroy/denox.git $GOPATH/src/github.com/axetroy/denox
$ cd $GOPATH/src/github.com/axetroy/denox
$ make build

Test

$ make test

Uninstall

remove $HOME/.denox folder with following command:

$ rm -rf $HOME/.denox

License

The MIT License

Package Rankings
Top 7.24% on Proxy.golang.org
Badges
Extracted from project README
Build Status Coverage Status Go Report Card