diff --git a/.drone.yml b/.drone.yml index 9da44d0..30ca69c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -41,26 +41,16 @@ steps: # run Go mod tidy prior to committing - test -z "$(git diff-index HEAD :^package-lock.json)" - - name: frontend + - name: go build image: docker.io/immawanderer/archlinux-go:linux-amd64 - depends_on: [pull] + depends_on: [go mod tidy] volumes: - name: gopath path: /go commands: - pacman -Sy && pacman -S --noconfirm --needed npm - - npm i - - npx tailwindcss -i ./assets/input/css/tailwind.css -o ./tmp/pcmt.css --minify - # ignore whitespace changes. - - diff -Nsb ./assets/public/css/pcmt.css ./tmp/pcmt.css || ( echo files differ; exit 1 ) - - - name: go build - image: docker.io/immawanderer/archlinux-go:linux-amd64 - depends_on: [go mod tidy, frontend] - volumes: - - name: gopath - path: /go - commands: + # generate frontend assets + - go generate -v . - go build -v . - name: go test @@ -115,26 +105,16 @@ steps: # run Go mod tidy prior to committing - test -z "$(git diff-index HEAD :^package-lock.json)" - - name: frontend + - name: go build image: docker.io/library/golang:1.20.4-alpine3.17 - depends_on: [pull] + depends_on: [go mod tidy] volumes: - name: gopath path: /go commands: - apk update -q && apk add -q --no-cache npm - - npm i - - npx tailwindcss -i ./assets/input/css/tailwind.css -o ./tmp/pcmt.css --minify - # ignore whitespace changes. - - diff -Nsb ./assets/public/css/pcmt.css ./tmp/pcmt.css || ( echo files differ; exit 1 ) - - - name: go build - image: docker.io/library/golang:1.20.4-alpine3.17 - depends_on: [go mod tidy, frontend] - volumes: - - name: gopath - path: /go - commands: + # generate frontend assets + - go generate -v . - go build -v . - name: go test diff --git a/.gitignore b/.gitignore index 8e34aaa..f6eed80 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ # main binary pcmt +/assets/public/css/pcmt.css + # dev config. /config.dhall diff --git a/README.md b/README.md index dde2278..aec525b 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,43 @@ config](exampleConfig.dhall). If you're new to Dhall, its [documentation](https://docs.dhall-lang.org/) page is a good resource to start at. +### 🔨 Building from sources + +pre-requisites: +* [`just`](https://github.com/casey/just) +* [`npm`](https://docs.npmjs.com/cli/v9/) +* [`go1.20`](https://go.dev/) +* `git` + +the application consists of *frontend* and *backend*. the *frontend* is +basically a **generated** TailwindCSS stylesheet and it is not shipped as part +of the development process. as such, it needs to be built from sources, same as +the backend. + +**step 0:** clone this repository with `git` + +then build the *frontend* using `just tw` or `just frontend` + +next, build the Go application using: +```sh +# debugging version. +just build + +# or with debugging information stripped. +just buildrelease +``` + +alternatively, build both *frontend* and *backend* in release modes using: +`just prod`. the order of the steps is important as the application embeds the +generated stylesheet. + +if you plan to run the application in `LiveMode`, the stylesheet can be +supplied when running the application; however, the binary will lack the way to +fall back to the embedded asset so bear that in mind. + +if you're curious, you can open the [`justfile`](justfile) to see the details +of the build targets like `tw` and `buildrelease` used above. + ### LICENSE AGPL-3.0-only (see [LICENSE](LICENSE) for details). diff --git a/assets/public/css/.do-not-delete b/assets/public/css/.do-not-delete new file mode 100644 index 0000000..e69de29 diff --git a/assets/public/css/pcmt.css b/assets/public/css/pcmt.css deleted file mode 100644 index 0656986..0000000 --- a/assets/public/css/pcmt.css +++ /dev/null @@ -1 +0,0 @@ -/*! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-left-5{left:-1.25rem}.-top-2{top:-.5rem}.bottom-0{bottom:0}.left-0{left:0}.right-\[3\.2rem\]{right:3.2rem}.top-0{top:0}.top-2{top:.5rem}.top-\[100vh\]{top:100vh}.z-20{z-index:20}.z-50{z-index:50}.m-4{margin:1rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.mr-3{margin-right:.75rem}.mt-0{margin-top:0}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.hidden{display:none}.h-6{height:1.5rem}.h-8{height:2rem}.h-screen{height:100vh}.max-h-14{max-height:3.5rem}.min-h-screen{min-height:100vh}.w-1\/2{width:50%}.w-24{width:6rem}.w-48{width:12rem}.w-6{width:1.5rem}.w-auto{width:auto}.w-full{width:100%}.min-w-\[300px\]{min-width:300px}.grow{flex-grow:1}.-translate-y-full{--tw-translate-y:-100%}.-translate-y-full,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.place-items-baseline{place-items:baseline}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-6{gap:1.5rem}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;white-space:nowrap}.text-ellipsis,.truncate{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-2{border-width:2px}.border-t{border-top-width:1px}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.fill-current{fill:currentColor}.fill-none{fill:none}.stroke-current{stroke:currentColor}.stroke-2{stroke-width:2}.p-2{padding:.5rem}.p-4{padding:1rem}.p-8{padding:2rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-11{padding-left:2.75rem;padding-right:2.75rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pl-1{padding-left:.25rem}.pl-3{padding-left:.75rem}.pr-4{padding-right:1rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-7xl{font-size:4.5rem;line-height:1}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.italic{font-style:italic}.tracking-wide{letter-spacing:.025em}.text-blue-300{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.text-fuchsia-500{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity))}.text-fuchsia-600{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-pink-400{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity))}.text-pink-500{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity))}.text-pink-600{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity))}.text-purple-300{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-rose-800{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:top-\[100\%\]:after{content:var(--tw-content);top:100%}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\:border-8:after{content:var(--tw-content);border-width:8px}.after\:border-x-transparent:after{content:var(--tw-content);border-left-color:#0000;border-right-color:#0000}.after\:border-b-transparent:after{content:var(--tw-content);border-bottom-color:#0000}.after\:border-t-gray-700:after{content:var(--tw-content);--tw-border-opacity:1;border-top-color:rgb(55 65 81/var(--tw-border-opacity))}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.required\:border-blue-300:required{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity))}.required\:border-slate-500:required{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity))}.valid\:border:valid{border-width:1px}.valid\:border-green-300:valid{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity))}.invalid\:border-pink-600:invalid{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity))}.hover\:cursor-pointer:hover{cursor:pointer}.hover\:bg-blue-400:hover{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.hover\:text-pink-600:hover{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity))}.hover\:text-purple-600:hover{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity))}.hover\:text-purple-700:hover{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow:hover{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\:border-blue-400:focus{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity))}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-2:focus,.focus\:ring:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-blue-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253/var(--tw-ring-opacity))}.focus\:ring-gray-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity))}.focus\:ring-opacity-40:focus{--tw-ring-opacity:0.4}.focus\:ring-opacity-50:focus{--tw-ring-opacity:0.5}.focus\:invalid\:border-pink-600:invalid:focus{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity))}.focus\:invalid\:ring-pink-300:invalid:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(249 168 212/var(--tw-ring-opacity))}.group\/navbar:hover .group-hover\/navbar\:block{display:block}.group:hover .group-hover\:flex{display:flex}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:collapse{visibility:collapse}.peer:placeholder-shown~.peer-placeholder-shown\:collapse{visibility:collapse}.peer:invalid~.peer-invalid\:block{display:block}@media (prefers-color-scheme:dark){.dark\:border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.dark\:border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}.dark\:border-slate-500{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity))}.dark\:border-slate-600{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity))}.dark\:bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.dark\:bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.dark\:bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.dark\:text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity))}.dark\:text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.dark\:text-fuchsia-400{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity))}.dark\:text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.dark\:text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.dark\:text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.dark\:text-pink-500{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity))}.dark\:text-purple-300{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity))}.dark\:text-purple-400{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity))}.dark\:text-rose-500{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity))}.dark\:text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.dark\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:required\:border-slate-300:required{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity))}.dark\:valid\:border-gray-600:valid{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.dark\:invalid\:border-pink-400:invalid{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity))}.dark\:hover\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.dark\:hover\:text-purple-500:hover{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity))}.dark\:hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:focus\:border-blue-300:focus{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity))}.dark\:focus\:ring-gray-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(75 85 99/var(--tw-ring-opacity))}.dark\:focus\:invalid\:border-pink-400:invalid:focus{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity))}}@media (min-width:640px){.sm\:p-0{padding:0}.sm\:px-1{padding-left:.25rem;padding-right:.25rem}}@media (min-width:768px){.md\:static{position:static}.md\:mx-0{margin-left:0;margin-right:0}.md\:mx-10{margin-left:2.5rem;margin-right:2.5rem}.md\:mx-4{margin-left:1rem;margin-right:1rem}.md\:mx-6{margin-left:1.5rem;margin-right:1.5rem}.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:w-1\/2{width:50%}.md\:w-32{width:8rem}.md\:w-auto{width:auto}.md\:w-full{width:100%}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2rem*var(--tw-space-x-reverse));margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)))}.md\:border-0{border-width:0}.md\:bg-transparent{background-color:initial}.md\:p-0{padding:0}.md\:p-2{padding:.5rem}.md\:px-12{padding-left:3rem;padding-right:3rem}.md\:py-16{padding-top:4rem;padding-bottom:4rem}.md\:pt-3{padding-top:.75rem}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}.md\:text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.md\:hover\:bg-transparent:hover{background-color:initial}.md\:hover\:text-blue-500:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}@media (prefers-color-scheme:dark){.md\:dark\:bg-transparent{background-color:initial}.md\:dark\:text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.md\:dark\:hover\:bg-transparent:hover{background-color:initial}.md\:dark\:hover\:text-blue-500:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}}}@media (min-width:1024px){.lg\:mx-4{margin-left:1rem;margin-right:1rem}.lg\:mx-auto{margin-left:auto;margin-right:auto}.lg\:mt-0{margin-top:0}.lg\:flex{display:flex}.lg\:w-1\/2{width:50%}.lg\:max-w-xl{max-width:36rem}.lg\:justify-between{justify-content:space-between}.lg\:px-14{padding-left:3.5rem;padding-right:3.5rem}.lg\:py-32{padding-top:8rem;padding-bottom:8rem}.lg\:text-3xl{font-size:1.875rem;line-height:2.25rem}} diff --git a/justfile b/justfile index af61a84..9afbf1b 100644 --- a/justfile +++ b/justfile @@ -28,11 +28,22 @@ tw: npm i npx tailwindcss -i ./assets/input/css/tailwind.css -o ./assets/public/css/pcmt.css --minify -# build the application. +# alias for tw. +frontend: tw + +# build the application with debugging information. build: go mod tidy go build -v -ldflags="-X main.version=$(git rev-parse --short HEAD)" . +# alias for build. +builddebug: build + +# build the application without debugging information. +buildrelease: + go mod tidy + go build -v -trimpaths -ldflags="-s -w -X main.version=$(git rev-parse --short HEAD)" . + # run the application. run: ./pcmt -devel @@ -41,7 +52,7 @@ run: dev: build run # prepare the app for production. -prod: tw build +prod: tw buildrelease # generate code based on ent schemas. gen: