Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.
/ Commands Public archive

๐ŸŒˆ Create commands shortcuts for node js and deno

License

Notifications You must be signed in to change notification settings

crewdevio/Commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Commands ๐Ÿ“ฆ

Commands for node users

create a file called run.config

inside he writes:

config:
  server: node server.js

then execute with node js the file Commands.js and enter your command.

Commands for deno users

nest badge deno nest badge

obsolescence information, this tool will no longer continue to be actively developed, it will only live updates that break its operation in later versions of deno. please use other alternatives such as trex, velociraptor or denon

for deno users now you can create command shortcuts to run files in deno and listen to changes in files.

create a file called run.json

inside he writes:

{
  "config": {
    "yourCommand": "--[any] anyFile.ts or .js"
  },
  "files": ["./myWatch.ts", "./src/index.js"]
}

note: by default listen to all files

to install Commands for deno you must run the command:

$ deno install --allow-read --allow-run -n commands --unstable https://deno.land/x/commands/Commands.ts

to update Commands run:

$ deno install -f --allow-read --allow-run -n commands --unstable https://deno.land/x/commands/Commands.ts

Use with deno

example:

in run.json

{
  "config": {
    "start": "--allow-net server.ts"
  },
  "files": ["./app.ts", "./server.ts"]
}

in command line

$ commands start

info โš 

the run.json file must be at the root of the directory to function.

Commands for deno is created with the standard libraries which are not yet completely stable, any problem can create an issue to the repository

installation permissions

  • Read: to read the run.json file

  • Run: to run deno in background