Skip to content

Generate js file based on values in environment variables

License

Notifications You must be signed in to change notification settings

papermerge/env2js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Env2JS

Generates JavaScript file based on PAPERMERGE__ values in environment variables

Here is the js template files:

window.__PAPERMERGE_RUNTIME_CONFIG__ = {
  ocr__lang_codes: "{{ .PAPERMERGE__OCR__LANG_CODES }}",
  ocr__default_lang_code: "{{ .PAPERMERGE__OCR__DEFAULT_LANG_CODE }}",
  ocr__automatic: {{ .PAPERMERGE__OCR__AUTOMATIC }}
}

Usage:

  $ env2js -f core.js.templ > papermerge_runtime.js

About

Generate js file based on values in environment variables

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages