-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdotenv.deno.txt
37 lines (28 loc) · 1.4 KB
/
dotenv.deno.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
┏━━━━━━━━━━━━┓
┃ DOTENV ┃
┗━━━━━━━━━━━━┛
VERSION ==> #See Deno doc
DOTENV FORMAT ==> #
#COMMENT #
VAR=VAL #VAL can contain any characters, including = or space
#Trimmed
VAR="VAL"
VAR='VAL' #To avoid trimming
VAR= #VAL is ""
VAR=$ENVVAR
VAR=${ENVVAR} E#Can \-escape $
VAR=${ENVVAR:-DEFAULT} E#
@std/dotenv/mod
load([OPTS])->>OBJ R#Load dotfile as OBJ
OPTS.envPath #'PATH'|null (def: './.env')
OPTS.export #BOOL (def: false). If true, use Deno.env.set(), unless already set
@std/dotenv/load #Import with side-effect that calls loadSync({ export: true })
deno bench|compile|eval|install
|run|repl|serve|test
--env-file[=FILE] !#Similar to @std/dotenv/load
#Does not need --allow-read
@std/dotenv/parse
parse('DOTENV_CONTENTS' #If ENVVARs specified, only allow those specific ones.
[, 'ENVVAR'_ARR])->OBJ #Use current process value instead otherwise
@std/dotenv/stringify
stringify(OBJ)->'DOTENV_CONTENTS' #