deno.land / x / denon@2.5.0 / docs / configuration / templates.md
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
Denon is designed to be simple but also extremely configurable to fit your
project needs. It supports JSON
, YAML
, and Typescript
configuration file.
Example in this page are provided in all three formats.
to create a basic configuration in the root directory of your project you can run:
denon --init
this will create a basic denon.json
file:
{
"scripts": {
"start": "app.js"
}
}
you can also initialize from a custom template (see the
templates
folder
for all the available templates)
denon --init <template>
<Tabs groupId="configuration-format" defaultValue="json" values={[ {label: 'JSON', value: 'json'}, {label: 'YML', value: 'yaml'}, {label: 'Typescript', value: 'typescript'}, ]}>
{
"$schema": "https://deno.land/x/denon/schema.json",
"scripts": {
"start": {
"cmd": "deno run app.ts",
"desc": "run my app.ts file"
}
}
}
scripts:
start:
cmd: "deno run app.ts"
desc: "run my app.ts file"
import { DenonConfig } from "https://deno.land/x/denon/mod.ts";
// ^ imports will be removed for semplicity in the next examples
export default <DenonConfig>{
scripts: {
start: {
cmd: "deno run app.ts",
desc: "run my app.ts file",
},
},
};
Version Info