Easy resource embedder
gassets alternatives and similar packages
Based on the "Resource Embedding" category
Do you think we are missing an alternative of gassets or a related project?
Easy asset and resource embedder!
Get the source and install it:
go get -u github.com/ShrewdSpirit/gassets/cmd/gassets/... go install github.com/ShrewdSpirit/gassets/cmd/gassets
gassets.toml file in your assets directory and write the following in it:
These are required keys for
output-path specifies where the generated file is placed. It's relative to the given directory (
-d commandline option).
For each virtual directory and file, a toml table is required.
root is the root of all your virtual directories and files. You can add as many vdirs and files to
root and any other vdir.
To add virtual directory to
root you should add:
You can add files to each vdir in two ways:
- Use glob
- Add a file table
To add files by globs,
include key must be supplied with an array of globs. See the example
Only matching files will be included in current vdir.
A file table has 2 keys, one being optional. The
path key is required and it's the path to the file relative to given directory.
The other key is
override-files which is an array of strings for files to be loaded instead if the given path exists at runtime. The path is relative to working directory.
-d: Assets directory (where
output-path="." [root] [root.file1] path="file.txt" [root.file2] path="test/file2.txt" [root.myvdir] include=["test/glob/*.jpg"] [root.myvdir.index_template] path="index.templ" override-files=["templates/index.templ", "index.templ"]
*Note that all licence references and agreements mentioned in the gassets README section above are relevant to that project's source code only.