forked from codeskyblue/gosuv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
140 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// +build !release | ||
|
||
package assets | ||
|
||
import "net/http" | ||
|
||
var HTTP http.FileSystem = http.Dir("./res") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
# all folders and files are relative to the path | ||
# where fileb0x was run at! | ||
|
||
# default: main | ||
pkg: assets | ||
|
||
# destination | ||
dest: "./assets/" | ||
|
||
# gofmt | ||
# type: bool | ||
# default: false | ||
fmt: true | ||
|
||
# build tags for the main b0x.go file | ||
tags: "release" | ||
|
||
# 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.yaml | ||
# | ||
# 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: true | ||
|
||
# valid values are: | ||
# -> "NoCompression" | ||
# -> "BestSpeed" | ||
# -> "BestCompression" | ||
# -> "DefaultCompression" or "" | ||
# | ||
# type: string | ||
# default: "DefaultCompression" # when: Compress == true && Method == "" | ||
method: "DefaultCompression" | ||
|
||
# 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: "assets_release.go" | ||
|
||
# [noprefix] disables adding "a" prefix to output | ||
# type: bool | ||
# default: false | ||
noprefix: true | ||
|
||
# [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 | ||
- base: "./res" | ||
files: | ||
- "./res/" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters