Coder Social home page Coder Social logo

deno_ex's Introduction

DenoEx Logo

Easily run TypeScript and Javascript using Deno right from Elixir!

Hex.pm GitHub Workflow Status (master) Coveralls master branch Support the project


Contents

Introduction

DenoEx is designed to make it simple to run scripts using Deno from your Elixir applications. Deno is a modern runtime for JavaScript and TypeScript that uses V8 and built-in Rust. It is secure by default, so you must opt into each level of access your scripts need when running. This includes reading environment variables.

Installation

The package can be installed by adding deno_ex to your list of dependencies in mix.exs:

def deps do
  [
    {:deno_ex, "~> 0.1.0"}
  ]
end

Installing the Runtime

By default Deno will automatically be installed in the package's priv directory as part of the compilation process. If you would like the build to place Deno in a different directory you may configure it. See the "Configuration" section of DenoEx.

Using DenoEx to Install Copies of the Runtime

Once you have DenoEx, you will need the Deno runtime. We have created a mix task that you can use to install Deno. By default, Deno will be installed in the priv directory for the deno_ex dependency. my_project/_build/dev/lib/deno_ex/priv/bin

mix deno_ex.install

The installation path may be changed using --path <path>. Permissions may also be changed on the deno executable using --chmod <octal>. The default permissions are 0x770.

Supporting DenoEx

If you rely on this library to run TypeScript and Javascript within your application, it would much appreciated if you can give back to the project in order to help ensure its continued development.

Checkout my GitHub Sponsorship page if you want to help out!

Gold Sponsors

Support the project

Silver Sponsors

Support the project

Bronze Sponsors

Support the project

Using DenoEx

Create a Typescript file with the following contents.

console.log("Hello, world.")

Open iex using iex -S mix and then run the TypeScript file:

iex > DenoEx.run({:file, "path/to/file.ts"})

deno_ex's People

Contributors

adkron avatar akoutmos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.