1.5 KiB
Code
I use 4 spaces for indentation. Go should ideally be formatted with goimports and/or gofmt. I don't use a formatter on typescript, so don't worry about that.
Code in Go should ideally use PascalCase for exported values, and camelCase for non-exported, JSON for transferring data should use snake_case, and Typescript should use camelCase. Forgive me for my many inconsistencies in this, and feel free to fix them if you want.
Functions in Go that need to access *appContext should be generally be receivers, except when the behaviour could be seen as somewhat independent from it (email.go is the best example, its behaviour is broadly independent from the main app except from a couple config values).
Compiling
Prefix each of these with make DEBUG=on INTERNAL=off :
allwill download deps and build everything. The executable and data will be placed inbuild. This is only necessary the first time.compilewill only compile go code into thebuild/jfa-goexecutable.typescriptwill compile typescript w/ sourcemaps intobuild/data/web/js.bundle-csswill bundle CSS and place it inbuild/data/web/css.configurationwill generate theconfig-base.json(used to render settings in the web ui) andconfig-default.iniand put them inbuild/data.emailwill compile email mjml, and copy the text versions in tobuild/data.copywill copy iconography, html, language files and static data intobuild/data.
See the wiki for more info.