Import templates from module?
-
Hello. Is it possible to configure jsreport to load templates from a separate package ? I would like to store my templates in git and import them without having to copy paste the code manually.
-
What do you mean by load from "separate package"?
The data directory from where templates are loaded can be configured using (docs)
"extensions": { "fs-store": { "dataDirectory": "data" } }
You can also use import export cli to configure your deployment process
https://jsreport.net/learn/import-exportAnd also have all kinds of other options for copying your git files to the prod jsreport instance.
-
Initially I wanted to load the templates as a npm module in jsreport. I didn't think the data folder can be versioned with git. I'll probably do that instead. Thanks for the help.