-
Notifications
You must be signed in to change notification settings - Fork 53
/
b0x.toml
173 lines (141 loc) · 3.95 KB
/
b0x.toml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# all folders and files are relative to the path
# where fileb0x was run at!
# default: main
pkg = "static"
# destination
dest = "./static/"
# gofmt
# type: bool
# default: false
fmt = false
# build tags for the main b0x.go file
tags = ""
# updater allows you to update a b0x in a running server
# without having to restart it
[updater]
# disabled by default
enabled = false
# empty mode creates a empty b0x file with just the
# server and the filesystem, then you'll have to upload
# the files later using the cmd:
# fileb0x -update=http://server.com:port b0x.toml
#
# it avoids long compile time
empty = false
# amount of uploads at the same time
workers = 3
# to get a username and password from a env variable
# leave username and password blank (username = "")
# then set your username and password in the env vars
# (no caps) -> fileb0x_username and fileb0x_password
username = "user"
password = "pass"
port = 8041
# compress files
# at the moment, only supports gzip
#
# type: object
[compression]
# activates the compression
#
# type: bool
# default: false
compress = false
# valid values are:
# -> "NoCompression"
# -> "BestSpeed"
# -> "BestCompression"
# -> "DefaultCompression" or ""
#
# type: string
# default: "DefaultCompression" // when: Compress == true && Method == ""
method = ""
# true = do it yourself (the file is written as gzip compressed file into the memory file system)
# false = decompress files at run time (while writing file into memory file system)
#
# type: bool
# default: false
keep = false
# ---------------
# -- DANGEROUS --
# ---------------
#
# cleans the destination folder (only b0xfiles)
# you should use this when using the spread function
# type: bool
# default: false
clean = false
# default: ab0x.go
output = "ab0x.go"
# [noprefix] disables adding "a" prefix to output
# type: bool
# default: false
noprefix = false
# [unexporTed] builds non-exporTed functions, variables and types...
# type: bool
# default: false
unexporTed = false
# [spread] means it will make a file to hold all fileb0x data
# and each file into a separaTed .go file
#
# example:
# theres 2 files in the folder assets, they're: hello.json and world.txt
# when spread is activaTed, fileb0x will make a file:
# b0x.go or [output]'s data, assets_hello.json.go and assets_world.txt.go
#
#
# type: bool
# default: false
spread = false
# [lcf] log changed files when spread is active
lcf = true
# [debug] is a debug mode where the files are read directly from the file
# sytem. Useful for web dev when files change when the server is running.
# type: bool
# default: false
debug = false
# type: array of objects
[[custom]]
# type: array of strings
files = ["../../README.md", "../../*.bat"]
# base is the path that will be removed from all files' path
# type: string
base = "../../"
# prefix is the path that will be added to all files' path
# type: string
prefix = "public/"
# build tags for this set of files
# it will only work if spread mode is enabled
tags = ""
# end: custom
[[custom]]
# everything inside the folder
# type: array of strings
files = ["./public/"]
# base is the path that will be removed from all files' path
# type: string
base = ""
# prefix is the path that will be added to all files' path
# type: string
prefix = ""
# build tags for this set of files
# it will only work if spread mode is enabled
tags = ""
# if you have difficulty to understand what base and prefix is
# think about it like this: [prefix] will replace [base]
# accetps glob
# type: array of strings
exclude = ["public/assets/data/exclude_me.txt"]
# replace strings in the file
# type: array of objects
[[custom.replace]]
# accepts glob
# type: string
file = "public/assets/data/*.json"
# case sensitive
# type: object with strings
[custom.replace.replace]
"{world}" = "hello world"
"{EMAIL}" = "contact@company.com"
# end: replace
# end: custom