Code Monkey home page Code Monkey logo

denon's Introduction

Denon

license stars issues ci releases deno version deno doc

Denon aims to be the deno replacement for nodemon providing a feature packed and easy to use experience.

Features

Denon provides most of the features you would expect of a file watcher and more.

  • Automatic restarting of deno application
  • Default support for deno run making it as easy as replacing deno with denon to run your code
  • Aliases for deno run, deno fmt and deno test
  • An extensive configuration file
  • Watching of specific directories
  • Glob matching for watched files and directories
  • Watching of only certain extensions
  • Set interval matching for good performance and not spamming executors
  • Specific executors for specific file types (e.g. denon file.py would work with the right configuration)

Install

To install denon simply enter the following into a terminal:

deno install --unstable --allow-read --allow-run -f https://deno.land/x/denon/denon.ts

Usage

To use denon simply think of denon as an alternative to deno run which accepts all the same flags if no flags or configuration has been set.

Usage:
    denon [COMMANDS] [OPTIONS] [DENO_ARGS] [SCRIPT] [-- <SCRIPT_ARGS>]

OPTIONS:
    -c, --config <file>     A path to a config file, defaults to [default: .denon | .denon.json | .denonrc | .denonrc.json]
    -d, --debug             Debugging mode for more verbose logging
    -e, --extensions        List of extensions to look for separated by commas
    -f, --fullscreen        Clears the screen each reload
    -h, --help              Prints this
    -i, --interval <ms>     The number of milliseconds between each check
    -m, --match <glob>      Glob pattern for all the files to match
    -q, --quiet             Turns off all logging
    -s, --skip <glob>       Glob pattern for ignoring specific files or directories
    -w, --watch             List of paths to watch separated by commas
        --fmt               Adds a deno fmt executor
        --test              Adds a deno test executor
    -u, --upgrade           Upgrade Specific Version. Default is latest.

COMMANDS:
    fmt                     Alias for flag --fmt
    test                    Alias for flag --test
    upgrade                 Alias for flag --upgrade latest

DENO_ARGS: Arguments passed to Deno to run SCRIPT (like permisssions)

Configuration

Denon supports local configuration files. The default filenames for these are .denon, .denon.json, .denonrc, .denonrc.json and are written in json. They can also be specified by using the --config <file> flag. These configuration files allow for even more features then the command line flags although command line flags always overrides the configuration file options. All of the options in the configuration file are optional and will be set to their default if nothing else is specified.

Example configuration with all of the possible configuration values set to something:

{
    "files": [
        "main.ts"
    ],
    "quiet": false,
    "debug": true,
    "fullscreen": true,
    "extensions": [
        ".js",
        ".ts",
        ".py",
        ".json"
    ],
    "interval": 500,
    "watch": [
        "source/",
        "tools/"
    ],
    "deno_args":[
        "--allow-net",
        "--import-map=import-map.json"
    ],
    "execute": {
        ".js": ["deno", "run"],
        ".ts": ["deno", "run"],
        ".py": ["python"]
    },
    "fmt": false,
    "test": true
}

Contributing

Contributions are very welcome! Just remember to run deno fmt to keep the style consistent.

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.