Commit Graph

14 Commits

Author SHA1 Message Date
Kailash Nadh ad9ee7528d Update build script to reflect new static paths 2020-03-08 16:10:34 +05:30
Kailash Nadh 2ee2e68230 Inject version during build into the frontend 2020-02-09 18:50:08 +05:30
Rohan Verma d5a47deb39
fix: buildString having incorrect TZ data 2019-09-06 13:43:49 +05:30
Kailash Nadh 08aa05cd13 Fix incorrect version string in build 2019-09-06 13:32:07 +05:30
Kailash Nadh e89a54b957 Refactor and add new build routines
- Fix version injection in build
- Refactor Makefile
- Add --new-config flag to generate sample config
- Add license
- Remove autogenerated frontend README
- Refactor make dist to do end-to-end build
- Refactor build and add goreleaser conf
2019-07-09 15:57:04 +05:30
Kailash Nadh 64043f0d62 Add run-frontend to Makefile 2019-07-02 13:23:44 +05:30
Kailash Nadh 1caa63b113 Rename 'build-dist' to 'dist' in Makefile 2019-06-26 17:50:53 +05:30
Kailash Nadh 95038d3f3c Refactor Makefile 2019-06-26 11:59:03 +05:30
Vivek R 11ca4beddb chore: fix frontend directory structure 2019-05-27 17:17:26 +05:30
Kailash Nadh 9729395648 Add dev README 2019-05-14 17:46:12 +05:30
Kailash Nadh e43c9b88e9 Add target 'run' to Makefile 2019-03-27 13:35:51 +05:30
Joe Paul 4ef5a3a042 chore: Go modules and add readme 2019-02-01 11:13:37 +05:30
Kailash Nadh 7eeb813f19 Add embedding of static assets for standalone dist binary
This is a big commit that involves drastic changes to how static assets
(.sql and template files, the whole frontend bundle) are handled.
listmonk distribution should be a self-contained single binary
distribution, hence all static assets should be bundled. After
evaluating several solutions, srtkkou/zgok seemed like the best bet but
it lacked several fundamental features, namely the ability to fall back
to the local filesystem in the absence of embedded assets (for instance,
in the dev mode). Moreover, there was a lot of room for cleanup.

After a PR went unanswered, github.com/knadh/stuffbin was created. Just
like zgok, this enables arbitrary files and assets to be embedded into a
compiled Go binary that can be read during runtime. These changes
followed:

- Compress and embed all static files into the binary during
  the build (Makefile) to make it standalone and distributable
- Refactor static paths (/public/* for public facing assets,
  /frontend/* for the frontend app's assets)
- Add 'logo_url' to config
- Remove 'assets_path' from config
- Tweak yarn build to not produce symbol maps and override
  the default /static (%PUBLIC_URL%) path to /frontend
2019-01-03 16:48:47 +05:30
Kailash Nadh 3ab21383b1 Fresh start 2018-10-25 19:21:47 +05:30