Created
September 11, 2022 21:50
-
-
Save JohnnyCurran/1ec9d62171ab6d55eec07b9e7c2118e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" If you are in src/Main.elm | |
" this will run `elm make src/Main.elm --output Main.js | |
" This is helpful so that `elm make` doesn't blow away index.html | |
" Why would you want this? | |
" If you're using tailwindcss, you need to link the outputted css | |
" in the <head> tag and `elm make` will clear it every time | |
" if it regenerates index.html | |
" set makeprg=elm\ make\ %\ --output\ '%:t:r'.js | |
" This makeprg assumes you're using tailwindcss and re-runs the processor | |
" This allows you to not dedicate a terminal process to | |
" npx tailwindcss --watch | |
" At the cost of makeprg running for a second or two more | |
" If you're using Dispatch.vim (and you should), this gets | |
" delegated to the background, and doesn't interrupt/freeze your foreground | |
" vim process | |
set makeprg=elm\ make\ %\ --output\ '%:t:r'.js\ &&\ npx\ tailwindcss\ -i\ app.css\ -o\ dist.css |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment