Skip to content

Commit

Permalink
release(v0.1.0): first release docs and some info
Browse files Browse the repository at this point in the history
  • Loading branch information
TeoDev1611 committed Aug 21, 2022
1 parent 7b9dd0f commit da5474d
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 147 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deno.enable": true
}
120 changes: 0 additions & 120 deletions 2

This file was deleted.

44 changes: 41 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,50 @@

---

Dont make your config experience bad only disfrute with this
Do you want to manage the settings of your apps? Make it easy with the help of
Beno

## What is this?

Well I need manage some config files for DPM and for make this a easy experience
and make more `type-safe` i wrote this is a way for read files from a dir using
an many encoders :sunglasses:

## Usage:

```ts
import { Beno } from 'https://deno.land/x/beno/mod.ts';

// Exists many options for this for example the json encoder or can create the encoder with jsonc prop
const beno = new Beno({ encoder: 'json' });

// Set a new key on the file
beno.set('filename.json', { key: 'beno', val: 'is awesome' });

// Get the value from a key in a filename
// This value can return string, boolean, or number
console.log(beno.get('beno').string());

// Check if a key exists:
beno.has('beno'); // -> Returns true
beno.has('notExists'); // Returns false

// Advanced functions

// Get the content in a Record<string,unknown>[]
console.log(beno.content());

// For configure some values you can use this function bellow the beno instance
beno.config(
`${Deno.cwd()}/newPath/forFolderConfig`,
`${Deno.cwd()}/custom-path/to/.envFile`, // Working in the implementation for this
);
```

## Why this name? :notes:

Simple I dont know a name for this project but I am listening Bad Bunny and why
not call this **Beno**
I didn't have a name for this project but I was listening to Bad Bunny and I'm
thinking why not call this project **Beno**.

## Information :book:

Expand Down
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"tasks": {
"test": "deno test -A --unstable",
"fmt": "deno fmt -c deno.json",
"fmt:check": "deno fmt -c deno.json --check && deno lint -c deno.json",
"fmt:check": "deno fmt -c deno.jsonc --check && deno lint -c deno.json",
"lint": "deno lint -c deno.json"
}
}
5 changes: 3 additions & 2 deletions dpm.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
"$schema": "https://dpmland.deno.dev/schema",
"name": "bad-cfg",
"version": "0.1.0",
"description": "Dont make your config experience bad only disfrute with this",
"description": "Do you want to manage the settings of your apps? Make it easy with the help of Beno",
"author": "The DPM Authors Team",
"license": "MIT",
"main": "mod.ts",
"scripts": {
"test": "deno test -A --unstable",
"fmt": "deno fmt -c deno.json",
"lint": "deno lint -c deno.json"
"lint": "deno lint -c deno.json",
"fmt:check": "deno fmt -c deno.jsonc --check && deno lint -c deno.json"
},
"dependencies": {
"path/": "0.152.0",
Expand Down
13 changes: 7 additions & 6 deletions eggs.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "bad-cfg",
"$schema": "https://x.nest.land/[email protected]/src/schema.json",
"name": "beno",
"entry": "mod.ts",
"description": "Dont make your config experience bad only disfrute with this",
"homepage": "https://github.com/the_name/bad-cfg",
"unstable": true,
"description": "Do you want to manage the settings of your apps? Make it easy with the help of Beno",
"homepage": "https://github.com/dpmland/beno",
"unstable": false,
"unlisted": false,
"releaseType": "patch",
"releaseType": "major",
"files": [
"./mod.ts",
"./src/**/*",
Expand All @@ -15,6 +16,6 @@
".git"
],
"checkFormat": "deno task fmt:check",
"checkInstallation": "deno test",
"checkInstallation": true,
"check": false
}
15 changes: 0 additions & 15 deletions examples.ts

This file was deleted.

26 changes: 26 additions & 0 deletions examples/basic.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Beno } from '../mod.ts';

// Exists many options for this for example the json encoder or can create the encoder with jsonc prop
const beno = new Beno({ encoder: 'json' });

// Set a new key on the file
beno.set('filename.json', { key: 'beno', val: 'is awesome' });

// Get the value from a key in a filename
// This value can return string, boolean, or number
console.log(beno.get('beno').string());

// Check if a key exists:
beno.has('beno'); // -> Returns true
beno.has('notExists'); // Returns false

// Advanced functions

// Get the content in a Record<string,unknown>[]
console.log(beno.content());

// For configure some values you can use this function bellow the beno instance
beno.config(
`${Deno.cwd()}/newPath/forFolderConfig`,
`${Deno.cwd()}/custom-path/to/.envFile`,
);

0 comments on commit da5474d

Please sign in to comment.