This project has the porpose to make easier the way to start and manage your code's permissions in an deno project. This CLI needs deno installed in your machine.
You see how you can install deno here.
With NPM:
npm install -g deno-cli
With Yarn:
yarn global add deno-cli
..>dm --help
Usage: index [options] [command]
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
init Initiate a deno project
run Run your deno project
help [command] display help for command
Create a workspace with two files: index.ts and config.json.
...>dm init
Creating index file and deno run config...
success Saved config file.
success Saved index file.
{
"name":"",
"author" : "",
"version":"1.0.0",
"main" : "index.ts",
"permissions":[
"--allow-net"
]
}
In this file you should add all the permissions that you need.
console.log("Hello world!");
Run the main file for your deno project based on the permissions at config.json
...>dm run
Executing: deno run --allow-net index.ts
Hello world!