All Projects → BentoumiTech → Denox

BentoumiTech / Denox

Licence: mit
Script runner and workspace configuration for Deno

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Labels

Projects that are alternatives of or similar to Denox

Bangajs
Bàngá is a CLI generator for scaffolding ExpressJS applications with speed and efficiency.
Stars: ✭ 102 (-2.86%)
Mutual labels:  cli
Cloudbase Framework
🏆 腾讯云开发 ☁️ 云原生一体化部署工具 🚀 CloudBase Framework:一键部署,不限框架语言,云端一体化开发,基于Serverless 架构。A front-end and back-end integrated deployment tool 🔥 One-click deploy to serverless architecture. https://docs.cloudbase.net/framework
Stars: ✭ 1,389 (+1222.86%)
Mutual labels:  cli
Awesome Cli
A curated list of awesome resources for building immersive CLI experiences.
Stars: ✭ 104 (-0.95%)
Mutual labels:  cli
Swiftplaygroundscli
Easily generate Swift Playgrounds from your command line 👨‍💻
Stars: ✭ 103 (-1.9%)
Mutual labels:  cli
Somafm
📻 Play & record SomaFM radio channels
Stars: ✭ 103 (-1.9%)
Mutual labels:  cli
Aura.cli
Command-Line Interface tools
Stars: ✭ 103 (-1.9%)
Mutual labels:  cli
Tmux Power
🎨 Tmux powerline theme
Stars: ✭ 102 (-2.86%)
Mutual labels:  cli
Nord Termite
An arctic, north-bluish clean and elegant Termite color theme.
Stars: ✭ 104 (-0.95%)
Mutual labels:  cli
Speedtest Linux
Get download/upload speeds via speedtest.net or fast.com from command line using Bash script -- suitable for logs. POSIX OSX Linux
Stars: ✭ 103 (-1.9%)
Mutual labels:  cli
Multivisor
Centralized supervisor WebUI and CLI
Stars: ✭ 104 (-0.95%)
Mutual labels:  cli
Npm Try
🚆 Quickly try npm packages without writing boilerplate code.
Stars: ✭ 103 (-1.9%)
Mutual labels:  cli
Riot Api
Riot League of Legends & DataDragon API wrappers for PHP7
Stars: ✭ 103 (-1.9%)
Mutual labels:  cli
Zip It And Ship It
Intelligently prepare Node.js Lambda functions for deployment
Stars: ✭ 104 (-0.95%)
Mutual labels:  cli
Posce
A note-taking toolkit for your command line.
Stars: ✭ 103 (-1.9%)
Mutual labels:  cli
Cli
Calibre's Node.js API and Command Line Client (CLI)
Stars: ✭ 104 (-0.95%)
Mutual labels:  cli
Urcli
CLI tool for the Udacity Reviews API
Stars: ✭ 102 (-2.86%)
Mutual labels:  cli
Cordless
The Discord terminal client you never knew you wanted.
Stars: ✭ 1,391 (+1224.76%)
Mutual labels:  cli
Mal
MAL: A MyAnimeList Command Line Interface [BROKEN: BLAME MyAnimeList]
Stars: ✭ 104 (-0.95%)
Mutual labels:  cli
Cli
Upload your templates to codesandbox with a single command 🏖️. This repo has been moved here: https://github.com/codesandbox-app/codesandbox-importers/tree/master/packages/cli
Stars: ✭ 104 (-0.95%)
Mutual labels:  cli
Void Space
Well-Typed Typing Tutor where you Type Types... in space... yup, you heard me
Stars: ✭ 104 (-0.95%)
Mutual labels:  cli


Deno script runner

GitHub Workflow Status latest SemVer Contribution welcome Commitizen friendly Semantic release MIT License

Install/UpgradeOverviewUsageGetting startedContributing

DenoX screenshot example

Install/Upgrade

Prerequisites: Deno (>=1.0.0)

$ deno install -Af -n denox https://denopkg.com/BentoumiTech/denox/denox.ts

Overview

DenoX is a cross platform script runner and workspace wrapper for Deno

Using DenoX, you can set up your workspace scripts permissions and options in declarative code.

In short, it allows you to to replace this:

$ deno run --allow-read --allow-write --allow-net main.ts

with this:

$ denox run start
  • DRY Only write your permissions and options once.
  • Packaged Your code can run on a different machine with a short single command denox run start
  • Cross Platform DenoX support and is tested on Linux, Mac OS and Windows.
  • Extensible 🔜

Usage

$ denox --help
denox v0.4.0

Usage:
  $ denox <command> [options]

Commands:
  run <script> [...args]  Run a script

For more info, run any command with the `--help` flag:
  $ denox run --help

Options:
  -h, --help     Display this message
  -v, --version  Display version number

Examples:
denox run start

Getting Started

deno-workspace file

Scripts and options need to be defined in a deno-workspace file at the root of your project.

DenoX supports YAML, JSON and typescript as format for deno-workspace.

In the following examples running $ denox run start will execute main.ts file with example.com networking permissions

YAML

deno-workspace.yml

scripts:
  start:
    file: main.ts
    deno_options:
      allow-net: example.com

JSON

deno-workspace.json

{
  "scripts": {
    "start": {
      "file": "main.ts",
      "deno_options": {
        "allow-net": "example.com"
      }
    }
  }
}

Typescript

deno-workspace.ts

import { DenoWorkspace } from "https://denopkg.com/BentoumiTech/denox/src/interfaces.ts";

const workspace: DenoWorkspace = {
  "scripts": {
    "start": {
      "file": "main.ts",
      "deno_options": {
        "allow-net": "example.com"
      }
    },
  },
};

export { workspace };

Scripts

You can easily run scripts using denox by adding them to the "scripts" field in deno-workspace and run them with denox run <script-name>.

Example:

scripts:
  # "denox run start" will execute main.ts with example.com networking permissions
  start:
    file: main.ts
    deno_options:
      allow-net: example.com
  # "denox run develop" will execute main.ts with localhost networking permissions and source code cache reloaded
  develop:
    file: main.ts
    deno_options:
      allow-net: localhost
      reload: true
      v8-flags:
        - --regexp-tier-up
        - --adjust-os-scheduling-parameters true

Options

Scripts can be extended with options.

deno_options:

Deno options will add the corresponding deno argument with it's value to the deno command.

It supports string, array of strings and boolean.

Example:

scripts:
  # "denox run start" will execute "deno run --allow-net=example.com github.com --reload --allow-read=./files main.ts"
  start:
    file: main.ts
    deno_options:
      reload: true
      allow-net:
        - example.com
        - github.com
      allow-read: ./files
      allow-write: false

Compatibility

It currently support all the options that are accepted by the deno run command. For more informations refer to deno run --help.

allow-all, allow-env, allow-hrtime, allow-net, allow-plugin, allow-read, allow-run,
allow-write, cached-only, cert, config, importmap, inspect, inspect-brk, lock, lock-write,
log-level, no-remote, quiet, reload, seed, unstable, v8-flags

Globals

Options added in "globals" field gets added to all scripts.

Note: If a same option is set in a script and also set globally the script scoped value overwrite the global one

Example:

scripts:
  # "denox run develop" inherit the --allow-read permission from the globals deno_options
  # "deno run --all-read main.ts"
  develop:
    file: main.ts
globals:
  deno_options:
    allow-read: true

Contributing

Please take a look at our contributing guidelines if you're interested in helping!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].