- Notifications
You must be signed in to change notification settings - Fork7
bundle your assets into single nim file inspired by go-bindata
License
NotificationsYou must be signed in to change notification settings
xmonader/nimassets
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
nimassetsNim Assets
is heavily inspired bygo-bindata to bundle all of your assets into one single nim file.
nimassets 0.2.2 (Bundle your assets into nim file) -h| --help: showhelp -v| --version: show version -o| --output: output filename -f| --fast: faster generation -d| --dir: dir to include (recursively) [can be used multipletimes-d=DIR1-d=DIR2 ...] -t| --type: binary| base64| zstd| base64zstd -cl| --compresslevel: compress levelfor zstd, default is 3
To bundle all the files in directorytemplatesdir
from theexamples
folder into single nim fileassetsfile.nim
cd examplesnimassets -d=templatesdir -o=assetsfile.nim
-f
or--fast
flag can help with large assets directories-t
or--type
encoding method, default is base64
import assetsfile # name from -o=<filename>echo assetsfile.getAsset("templatesdir/index.html")
To run tests, simply donimble test
from the root of this repository.
To compile the distributable binary, runnimble assetsBin
. It will be built and available in./build/nimassets
.